rocksdb/utilities
Maysam Yabandeh 199fabc197 WritePrepared: non-atomic commit of delayed prepared (#4947)
Summary:
Commit of delayed prepared has two non-atomic steps: add to commit cache, remove from delayed_prepared_. Similarly in ::IsInSnapshot we read from commit cache first and then look into delayed_prepared_. Due to non-atomicity thus the reader might not find the
prep_seq that is just committed neither in commit cache nor in delayed_prepared_. To fix that i)
we check if there was any delayed prepared BEFORE looking into commit
cache, ii) if there was, we complete the search steps to be these: i)
commit cache, ii) delayed prepared, commit cache again. In this way if
the first query to commit cache missed the commit, the 2nd will catch it. The cost of the redundant read from commit cache is paid only if delayed_prepared_ is nonempty which should be a very rare scenario.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/4947

Differential Revision: D13952754

Pulled By: maysamyabandeh

fbshipit-source-id: 8f47826b13f8ce154398d842028342423f4ca2b2
2019-02-06 08:48:06 -08:00
..
backupable Backup engine support for direct I/O reads (#4640) 2018-11-13 11:17:25 -08:00
blob_db Always delete Blob DB files in the background (#4928) 2019-01-29 15:50:03 -08:00
cassandra fix tombstone collectable test (#4755) 2018-12-07 10:13:54 -08:00
checkpoint Enable checkpoint of read-only db (#4681) 2018-12-07 17:06:02 -08:00
compaction_filters Comment out unused variables 2018-03-05 13:13:41 -08:00
convenience Change RocksDB License 2017-07-15 16:11:23 -07:00
leveldb_options Change RocksDB License 2017-07-15 16:11:23 -07:00
lua Per-thread unique test db names (#4135) 2018-07-13 17:27:39 -07:00
memory Per-thread unique test db names (#4135) 2018-07-13 17:27:39 -07:00
merge_operators Support pragma once in all header files and cleanup some warnings (#4339) 2018-09-05 18:13:31 -07:00
option_change_migration comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
options Update all unique/shared_ptr instances to be qualified with namespace std (#4638) 2018-11-09 11:19:58 -08:00
persistent_cache Update all unique/shared_ptr instances to be qualified with namespace std (#4638) 2018-11-09 11:19:58 -08:00
simulator_cache Add path to WritableFileWriter. (#4039) 2018-08-23 10:12:58 -07:00
table_properties_collectors Reduce runtime of compact_on_deletion_collector_test (#4779) 2018-12-13 14:47:08 -08:00
trace Add the max trace file size limitation option to Tracing (#4610) 2018-11-27 14:27:05 -08:00
transactions WritePrepared: non-atomic commit of delayed prepared (#4947) 2019-02-06 08:48:06 -08:00
ttl Update all unique/shared_ptr instances to be qualified with namespace std (#4638) 2018-11-09 11:19:58 -08:00
write_batch_with_index Revert "BaseDeltaIterator: always check valid() before accessing key(… (#4744) 2018-12-03 23:38:27 -08:00
debug.cc Remove v1 RangeDelAggregator (#4778) 2018-12-17 17:33:46 -08:00
env_librados_test.cc Update all unique/shared_ptr instances to be qualified with namespace std (#4638) 2018-11-09 11:19:58 -08:00
env_librados.cc Suppress lint in old files 2018-01-29 12:56:42 -08:00
env_librados.md Add EnvLibrados - RocksDB Env of RADOS (#1222) 2016-07-21 11:16:34 -07:00
env_mirror_test.cc Update all unique/shared_ptr instances to be qualified with namespace std (#4638) 2018-11-09 11:19:58 -08:00
env_mirror.cc Update all unique/shared_ptr instances to be qualified with namespace std (#4638) 2018-11-09 11:19:58 -08:00
env_timed_test.cc fix memory leak in two_level_iterator 2018-04-15 17:26:26 -07:00
env_timed.cc Update all unique/shared_ptr instances to be qualified with namespace std (#4638) 2018-11-09 11:19:58 -08:00
merge_operators.h Support StringAppendOperator(delimiter_char) constructor in java-api 2018-03-08 16:17:47 -08:00
object_registry_test.cc fix memory leak in two_level_iterator 2018-04-15 17:26:26 -07:00
util_merge_operators_test.cc Change RocksDB License 2017-07-15 16:11:23 -07:00