rocksdb/db_stress_tool
Andrew Kryczka 933ac0e05c Fix locking for ColumnFamilyOptions::inplace_update_support (#12624)
Summary:
In `SaveValue()`, the read lock needs to be obtained before `VerifyEntryChecksum()` because the KV checksum verification reads the entire value metadata+data, which is all mutable when `ColumnFamilyOptions::inplace_update_support == true`.

In `MemTable::Update()`, the write lock needs to be obtained before mutating the value metadata (changing the value size) because it can be read concurrently.

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

Test Plan:
```
$ make COMPILE_WITH_TSAN=1 -j56 db_stress
...
$ python3 tools/db_crashtest.py blackbox --simple --max_key=10 --inplace_update_support=1 --interval=10 --allow_concurrent_memtable_write=0
```

Reviewed By: cbi42

Differential Revision: D57034571

Pulled By: ajkr

fbshipit-source-id: 3dddf881ad87923143acdf6bfec12ce47bb13a48
2024-05-08 08:30:12 -07:00
..
batched_ops_stress.cc Add TimedPut to stress test (#12559) 2024-04-30 15:40:35 -07:00
cf_consistency_stress.cc Add TimedPut to stress test (#12559) 2024-04-30 15:40:35 -07:00
CMakeLists.txt Add the wide-column aware merge API to the stress tests (#11906) 2023-09-29 08:54:50 -07:00
db_stress.cc
db_stress_common.cc Add TimedPut to stress test (#12559) 2024-04-30 15:40:35 -07:00
db_stress_common.h Add TimedPut to stress test (#12559) 2024-04-30 15:40:35 -07:00
db_stress_compaction_filter.h
db_stress_driver.cc Prefer static_cast in place of most reinterpret_cast (#12308) 2024-02-07 10:44:11 -08:00
db_stress_driver.h Remove unnecessary, confusing 'extern' (#12300) 2024-01-29 10:38:08 -08:00
db_stress_env_wrapper.h Change ReadAsync callback API to remove const from FSReadRequest (#11649) 2024-02-16 09:14:55 -08:00
db_stress_gflags.cc Add TimedPut to stress test (#12559) 2024-04-30 15:40:35 -07:00
db_stress_listener.cc Fix/improve temperature handling for file ingestion (#12402) 2024-03-05 16:56:08 -08:00
db_stress_listener.h Make stopped writes block on recovery (#11879) 2023-10-10 06:29:01 -07:00
db_stress_shared_state.cc
db_stress_shared_state.h Added compaction read errors to db_stress (#11789) 2023-09-05 10:41:29 -07:00
db_stress_stat.cc
db_stress_stat.h
db_stress_table_properties_collector.h Remove 'virtual' when implied by 'override' (#12319) 2024-01-31 13:14:42 -08:00
db_stress_test_base.cc Clarify manual compaction and file ingestion behavior with FIFO compaction (#12618) 2024-05-07 12:00:15 -07:00
db_stress_test_base.h Add more public APIs to crash/stress test (#12541) 2024-04-16 15:43:26 -07:00
db_stress_tool.cc Fix locking for ColumnFamilyOptions::inplace_update_support (#12624) 2024-05-08 08:30:12 -07:00
db_stress_wide_merge_operator.cc Add the wide-column aware merge API to the stress tests (#11906) 2023-09-29 08:54:50 -07:00
db_stress_wide_merge_operator.h Add the wide-column aware merge API to the stress tests (#11906) 2023-09-29 08:54:50 -07:00
expected_state.cc Add TimedPut to stress test (#12559) 2024-04-30 15:40:35 -07:00
expected_state.h Improve comment of ExpectedValue in db stress (#11456) 2023-05-18 09:44:15 -07:00
expected_value.cc Improve comment of ExpectedValue in db stress (#11456) 2023-05-18 09:44:15 -07:00
expected_value.h Ensures PendingExpectedValue either Commit or Rollback (#12244) 2024-01-24 11:04:40 -08:00
multi_ops_txns_stress.cc Group SST write in flush, compaction and db open with new stats (#11910) 2023-12-29 15:29:23 -08:00
multi_ops_txns_stress.h Group rocksdb.sst.read.micros stat by IOActivity flush and compaction (#11288) 2023-04-21 09:07:18 -07:00
no_batched_ops_stress.cc Add TimedPut to stress test (#12559) 2024-04-30 15:40:35 -07:00