sapling/eden/mononoke/segmented_changelog
Stefan Filip 3094096af7 segmented_changelog: fix OverlayIdMap::get_last_entry
Summary:
The problem appears when we have shared idmap moving ahead of the memory idmap
before we ever write to the memory idmap. In that case we would incorrectly
fetch last shared from the shared idmap. When that shared last entry is larger
than the cutoff we would try to assign ids starting from the shared entry. When
updating the IdDag it would assume that it has to insert all ids above the
cutoff but it would fail to resolve all ids exactly above the cutoff.

For example, MemIdMap is empty, cutoff is 5, shared idmap last entry is 7. We
asign 8-10 then the IdDag tries to search for 5-10 and fails to resolve 5.

This function was not updated after adding cutoff to OverlayIdMap in an earlier
diff.

Reviewed By: quark-zju

Differential Revision: D27248367

fbshipit-source-id: 97fc1efe8cdfb446c4571196dcef7c2db9a43330
2021-03-22 18:54:23 -07:00
..
bench/concurrent_idmap third-party/rust: update tokio & tokio-stream 2021-03-10 11:01:28 -08:00
schemas segmented_changelog: rename DagBundle to SegmentedChangelogVersion 2021-03-10 12:15:52 -08:00
src segmented_changelog: fix OverlayIdMap::get_last_entry 2021-03-22 18:54:23 -07:00
types segmented_changelog: split trait to separate crate 2021-03-22 07:26:47 -07:00
Cargo.toml segmented_changelog: split trait to separate crate 2021-03-22 07:26:47 -07:00