Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #994.
VecReduceBackenddraws each key's records sorted by(data, novel, time), so for each value it presents the prior records first and then the novel ones. It advances prior records tolower. With partially ordered times this can move a prior record past a novel record of the same value, for example(0, 5)to(1, 5), after the novel(1, 0). The input bridge is then unsorted, and it can also be unconsolidated, which failsdebug_assert_sorted_bridge.This change sorts the drawn records by
(data, time, novel). The flag still stops consolidation from cancelling a novel record against a prior one. A prior and a novel record at the same time now arrive next to each other, sonext_windownets them, as its comment says.Release builds already gave correct output, because
ValueHistory::load_itersorts and consolidates each value's edits. This change makes the backend meet the contract that the assertion checks.Test
reduce_prior_advanced_past_novelintests/int_proxy.rsretires a prior record at(0, 5), then a novel+1at(1, 0)and-1at(1, 5)withlower = {(1, 0)}, and checks the output. It panics without this change.cargo test --workspacepasses. With this change, 4,000 random inputs at partially ordered times on 1 to 4 workers run in a debug build without the assertion failing, and match a reference. Without it, the assertion fails on 1,374 of 1,600.