Closed ruchirK closed 3 years ago
cc: @frankmcsherry this is the thing we discussed on Monday. I looked through the code for callers of set_logical_compaction
/ set_physical_compaction
-- I didn't find anything that enforced the old strictly greater than invariant.
Ah, this might come down to "beyond" being underspecified. It was introduced when folks didn't like "in advance of" and was meant to mean "greater than or equal to" but .. looks like it was just as confusing in a different way.
…or beyond current frontier.
This commit changes the requirements set_{logical,physical}_compaction methods to match those of Capability::downgrade. Now, these methods all accept arguments equal to or beyond the most recent argument passed, or initial value if the function was never called before.
Also added a debug assert to make sure the logical compaction only advances.