rocksdb/utilities
Maysam Yabandeh 1a5a93ff74 WritePrepared: Fix double snapshot release issue (#4727)
Summary:
Currently the garbage collection of items in old_commit_map_ was done upon ::ReleaseSnapshot. The assumption behind this method was that the sequence number of snapshots are unique, which is incorrect. In the very rare cases that two consecutive snapshot have the same sequence number this could lead the release of the first snapshot affect the old_commit_map_ that is necessary to service the reads of the second snapshot. The bug would be triggered only if i) two snapshot have the same seq, ii) both of them are very old (older than the last ~4m transactions), and iii) there is commit entry overlapping with the snapshot seq number.
It is fixed by doing the cleanup of old_commit_map_ in UpdateSnapshot: the new list of snapshots are compared with the old one and the missing sequence numbers are concluded released. If two snapshots have the same seq number, after the release of one of them, the seq number still appears in the snapshot least and thus not cleaned up prematurely.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/4727

Differential Revision: D13246495

Pulled By: maysamyabandeh

fbshipit-source-id: 93b87a5042afd8060889df245526d3f5d29de9fe
2018-11-28 19:03:31 -08:00
..
backupable Backup engine support for direct I/O reads (#4640) 2018-11-13 11:17:25 -08:00
blob_db BlobDB: use char array instead of string as buffer (#4662) 2018-11-13 12:49:29 -08:00
cassandra Update all unique/shared_ptr instances to be qualified with namespace std (#4638) 2018-11-09 11:19:58 -08:00
checkpoint Update all unique/shared_ptr instances to be qualified with namespace std (#4638) 2018-11-09 11:19:58 -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
date_tiered Clean up FragmentedRangeTombstoneList (#4692) 2018-11-28 15:29:02 -08:00
document Update all unique/shared_ptr instances to be qualified with namespace std (#4638) 2018-11-09 11:19:58 -08:00
geodb avoid copying when iterating using range-based for (#4459) 2018-10-09 17:15:51 -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
redis rocksdb: put #pragma once before #ifdef 2018-10-04 17:10:21 -07:00
simulator_cache Add path to WritableFileWriter. (#4039) 2018-08-23 10:12:58 -07:00
spatialdb Update all unique/shared_ptr instances to be qualified with namespace std (#4638) 2018-11-09 11:19:58 -08:00
table_properties_collectors Allow dynamic modification of window size and deletion trigger (#4403) 2018-09-20 15:15:28 -07:00
trace Add the max trace file size limitation option to Tracing (#4610) 2018-11-27 14:27:05 -08:00
transactions WritePrepared: Fix double snapshot release issue (#4727) 2018-11-28 19:03:31 -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 "apply ReadOptions.iterate_upper_bound to transaction iterator… (#4705) 2018-11-24 10:46:28 -08:00
col_buf_decoder.cc Support pragma once in all header files and cleanup some warnings (#4339) 2018-09-05 18:13:31 -07:00
col_buf_decoder.h Comment out unused variables 2018-03-05 13:13:41 -08:00
col_buf_encoder.cc fix shift UBSAN error in col_buf_encoder.cc 2018-02-20 16:44:00 -08:00
col_buf_encoder.h Change RocksDB License 2017-07-15 16:11:23 -07:00
column_aware_encoding_exp.cc Update all unique/shared_ptr instances to be qualified with namespace std (#4638) 2018-11-09 11:19:58 -08:00
column_aware_encoding_test.cc Change RocksDB License 2017-07-15 16:11:23 -07:00
column_aware_encoding_util.cc Revert "Digest ZSTD compression dictionary once per SST file (#4251)" (#4347) 2018-09-06 09:58:34 -07:00
column_aware_encoding_util.h Move prefix_extractor to MutableCFOptions 2018-05-21 14:43:11 -07:00
debug.cc Clean up FragmentedRangeTombstoneList (#4692) 2018-11-28 15:29:02 -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