Fix commutative squashing failing when lowest layer resolved earlier than others #587
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.
The commutative squashing would previously only start when
the lowest commutative layer (the first one) was written.
This ignored the case however of when this layer has already
been written. When this was the case the stopping condition
was unreachable and commutative layers were never squashed.
The change is to continuously squash the commutative layers
with the least priorities as they're written.
This change also gets rid of the temporary
squash
queue,which ends up making it a rather nice implementation.
Resolve #574