rocksdb/utilities
Peter Dillinger 390cc0b156 Ensure LockWAL() stall cleared for UnlockWAL() return (#11172)
Summary:
Fixes https://github.com/facebook/rocksdb/issues/11160

By counting the number of stalls placed on a write queue, we can check in UnlockWAL() whether the stall present at the start of UnlockWAL() has been cleared by the end, or wait until it's cleared.

More details in code comments and new unit test.

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

Test Plan: unit test added. Yes, it uses sleep to amplify failure on buggy behavior if present, but using a sync point to only allow new behavior would fail with the old code only because it doesn't contain the new sync point. Basically, using a sync point in UnlockWAL() could easily mask a regression by artificially limiting key behaviors. The test would only check that UnlockWAL() invokes code that *should* do the right thing, without checking that it *does* the right thing.

Reviewed By: ajkr

Differential Revision: D42894341

Pulled By: pdillinger

fbshipit-source-id: 15c9da0ca383e6aec845b29f5447d76cecbf46c3
2023-02-03 12:08:37 -08:00
..
agg_merge
backup Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
blob_db Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
cassandra Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
checkpoint Cleanup, improve, stress test LockWAL() (#11143) 2023-01-30 22:52:30 -08:00
compaction_filters Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
convenience
leveldb_options
memory Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
merge_operators Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
option_change_migration Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
options Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
persistent_cache Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
simulator_cache
table_properties_collectors Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
trace Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
transactions Ensure LockWAL() stall cleared for UnlockWAL() return (#11172) 2023-02-03 12:08:37 -08:00
ttl Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
write_batch_with_index Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
cache_dump_load.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
cache_dump_load_impl.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
cache_dump_load_impl.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
compaction_filters.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
counted_fs.cc
counted_fs.h
debug.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
env_mirror.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
env_mirror_test.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
env_timed.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
env_timed.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
env_timed_test.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
fault_injection_env.cc
fault_injection_env.h
fault_injection_fs.cc
fault_injection_fs.h
fault_injection_secondary_cache.cc
fault_injection_secondary_cache.h
memory_allocators.h
merge_operators.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
merge_operators.h
object_registry.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
object_registry_test.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
util_merge_operators_test.cc
wal_filter.cc