rocksdb/db/db_impl
Jay Huh f16ba42116 Fix IteratorsConsistentView tests (#12582)
Summary:
Fixing the failure in IteratorsConsistentViewExplicitSnapshot as shown in https://github.com/facebook/rocksdb/actions/runs/8825927545/job/24230854140?pr=12581

The failure was due to the timing of the `flush()` for the later Column Family in the loop. If the flush for the later CFs installs the new super version before getting the SV for the iterator, assertion succeeds, but if the order flips, SV will be obsolete and assertion can fail.

This PR simplifies the test in a way that we do only one `flush()` so that `SYNC_POINT` can guarantee the order of operations. For ImplicitSnapshot test, it now just triggers flush for the second CF after obtaining SV for the first CF. For the ExplicitSnapshot test, it now triggers atomic flush() for all CFs after obtaining SV for the first CF.

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

Test Plan:
```
./db_iterator_test --gtest_filter="*IteratorsConsistentView*"
./multi_cf_iterator_test -- --gtest_filter="*ConsistentView*
```

Reviewed By: ajkr, jowlyzhang

Differential Revision: D56557234

Pulled By: jaykorean

fbshipit-source-id: 7aa2f6d0e12a915b6e16cd240389bcfb5b4a5b62
2024-04-25 14:06:46 -07:00
..
compacted_db_impl.cc Run internal cpp modernizer on RocksDB repo (#12398) 2024-03-04 10:08:32 -08:00
compacted_db_impl.h Deprecate some variants of Get and MultiGet (#12327) 2024-02-16 09:21:06 -08:00
db_impl.cc Fix IteratorsConsistentView tests (#12582) 2024-04-25 14:06:46 -07:00
db_impl.h MultiCFSnapshot for NewIterators() API (#12573) 2024-04-24 15:28:55 -07:00
db_impl_compaction_flush.cc Fix DisableManualCompaction() hang (#12578) 2024-04-24 12:40:36 -07:00
db_impl_debug.cc
db_impl_experimental.cc Run internal cpp modernizer on RocksDB repo (#12398) 2024-03-04 10:08:32 -08:00
db_impl_files.cc Remove the force mode for EnableFileDeletions API (#12337) 2024-02-13 18:36:25 -08:00
db_impl_follower.cc Make sure DBImplFollower::stop_requested_ is initialized (#12572) 2024-04-22 12:02:28 -07:00
db_impl_follower.h Basic RocksDB follower implementation (#12540) 2024-04-19 19:13:31 -07:00
db_impl_open.cc Retry DB::Open upon a corruption detected while reading the MANIFEST (#12518) 2024-04-18 17:36:33 -07:00
db_impl_readonly.cc Run internal cpp modernizer on RocksDB repo (#12398) 2024-03-04 10:08:32 -08:00
db_impl_readonly.h Remove the force mode for EnableFileDeletions API (#12337) 2024-02-13 18:36:25 -08:00
db_impl_secondary.cc Retry DB::Open upon a corruption detected while reading the MANIFEST (#12518) 2024-04-18 17:36:33 -07:00
db_impl_secondary.h Basic RocksDB follower implementation (#12540) 2024-04-19 19:13:31 -07:00
db_impl_write.cc Enable recycle_log_file_num option for point in time recovery (#12403) 2024-03-21 12:29:35 -07:00