snapshots of FragmentedRangeTombstoneList must in ascending order (#11046)

Summary:
`snapshots` argument of `FragmentedRangeTombstoneList` should be in ascending order.

If we pass it in descending order order, it will not work.

for example:

```
  auto range_del_iter = MakeRangeDelIter({{"a", "e", 3},{"a","e", 6}});

  FragmentedRangeTombstoneList fragment_list(
      std::move(range_del_iter), bytewise_icmp, true /* for_compaction */,
      {8 ,7 ,4} /* snapshots */);
    FragmentedRangeTombstoneIterator iter(&fragment_list, bytewise_icmp,
                                        kMaxSequenceNumber /* upper_bound */);
  VerifyFragmentedRangeDels(&iter, {{"a", "e", 6}, {"a", "e", 3}});
```
VerifyFragmentedRangeDels will fail.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/11046

Reviewed By: ajkr

Differential Revision: D42148654

Pulled By: cbi42

fbshipit-source-id: a2e76f96dccf56fcca1a91cb8da9b99145f68026
This commit is contained in:
ehds 2022-12-19 15:06:22 -08:00 committed by Facebook GitHub Bot
parent 692d6be358
commit ddad943c29
1 changed files with 1 additions and 1 deletions

View File

@ -354,7 +354,7 @@ TEST_F(RangeTombstoneFragmenterTest,
FragmentedRangeTombstoneList fragment_list( FragmentedRangeTombstoneList fragment_list(
std::move(range_del_iter), bytewise_icmp, true /* for_compaction */, std::move(range_del_iter), bytewise_icmp, true /* for_compaction */,
{20, 9} /* upper_bounds */); {9, 20} /* snapshots */);
FragmentedRangeTombstoneIterator iter(&fragment_list, bytewise_icmp, FragmentedRangeTombstoneIterator iter(&fragment_list, bytewise_icmp,
kMaxSequenceNumber /* upper_bound */); kMaxSequenceNumber /* upper_bound */);
VerifyFragmentedRangeDels(&iter, {{"a", "c", 10}, VerifyFragmentedRangeDels(&iter, {{"a", "c", 10},