Prevent enter_at
from using enter_at
#469
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Collection::enter_at
used timely'senter_at
trait and method, but .. it is bad. Its implementation is roughlyenter().delay()
, wheredelay()
does us the favor of queueing all input data until the delayed-to timestamp has passed. In a nested timestamp context, this means until the outer timestamp has fully passed, because it is not until then that we might not see(time, 0)
in the loop.So that means that users of
enter_at
introduce a stalling operator that prevents updates from passing through linear operators (map
,filter
) and from landing in a consolidating merge batcher where they will be compactly maintained.The PR just deletes the use of
enter_at
, replacing it withenter
. This seems harmless, as the(_, time, _)
field of the triple is still updated, and it is only the introduced capability that is not delayed, but .. nothing good will happen until the outer timestamp clears anyhow, and the update'stime
needs to be consulted by the receiving operator in any case.The PR also updates the
accumulate.rs
example to use a nested scope andenter_at
, which without the fix grows without bound, and with the fix stays at about 2MB or so.