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
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
db_stress_shared_state.cc
db_stress_shared_state.h
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
db_stress_wide_merge_operator.h
expected_state.cc Add TimedPut to stress test (#12559) 2024-04-30 15:40:35 -07:00
expected_state.h
expected_value.cc
expected_value.h
multi_ops_txns_stress.cc
multi_ops_txns_stress.h
no_batched_ops_stress.cc Add TimedPut to stress test (#12559) 2024-04-30 15:40:35 -07:00