rocksdb/utilities
Maysam Yabandeh bb2a2ec731 WritePrepared Txn: rollback via commit
Summary:
Currently WritePrepared rolls back a transaction with prepare sequence number prepare_seq by i) write a single rollback batch with rollback_seq, ii) add <rollback_seq, rollback_seq> to commit cache, iii) remove prepare_seq from PrepareHeap.
This is correct assuming that there is no snapshot taken when a transaction is rolled back. This is the case the way MySQL does rollback which is after recovery. Otherwise if max_evicted_seq advances the prepare_seq, the live snapshot might assume data as committed since it does not find them in CommitCache.
The change is to simply add <prepare_seq. rollback_seq> to commit cache before removing prepare_seq from PrepareHeap. In this way if max_evicted_seq advances prpeare_seq, the existing mechanism that we have to check evicted entries against live snapshots will make sure that the live snapshot will not see the data of rolled back transaction.
Closes https://github.com/facebook/rocksdb/pull/3745

Differential Revision: D7696193

Pulled By: maysamyabandeh

fbshipit-source-id: c9a2d46341ddc03554dded1303520a1cab74ef9c
2018-04-20 15:28:19 -07:00
..
backupable fix memory leak in two_level_iterator 2018-04-15 17:26:26 -07:00
blob_db fix memory leak in two_level_iterator 2018-04-15 17:26:26 -07:00
cassandra comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
checkpoint fix memory leak in two_level_iterator 2018-04-15 17:26:26 -07: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 fix memory leak in two_level_iterator 2018-04-15 17:26:26 -07:00
document fix memory leak in two_level_iterator 2018-04-15 17:26:26 -07:00
geodb 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 fix memory leak in two_level_iterator 2018-04-15 17:26:26 -07:00
memory fix memory leak in two_level_iterator 2018-04-15 17:26:26 -07:00
merge_operators comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
option_change_migration comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
options fix memory leak in two_level_iterator 2018-04-15 17:26:26 -07:00
persistent_cache comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
redis fix memory leak in two_level_iterator 2018-04-15 17:26:26 -07:00
simulator_cache comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
spatialdb fix memory leak in two_level_iterator 2018-04-15 17:26:26 -07:00
table_properties_collectors fix memory leak in two_level_iterator 2018-04-15 17:26:26 -07:00
transactions WritePrepared Txn: rollback via commit 2018-04-20 15:28:19 -07:00
ttl fix memory leak in two_level_iterator 2018-04-15 17:26:26 -07:00
write_batch_with_index Comment out unused variables 2018-03-05 13:13:41 -08:00
col_buf_decoder.cc Change RocksDB License 2017-07-15 16:11:23 -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 fix memory leak in two_level_iterator 2018-04-15 17:26:26 -07:00
column_aware_encoding_test.cc Change RocksDB License 2017-07-15 16:11:23 -07:00
column_aware_encoding_util.cc WritePrepared Txn: fix non-emptied PreparedHeap bug 2018-02-21 13:42:23 -08:00
column_aware_encoding_util.h Change RocksDB License 2017-07-15 16:11:23 -07:00
debug.cc Fix naming in InternalKey 2017-09-12 17:17:42 -07: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_librados_test.cc Change RocksDB License 2017-07-15 16:11:23 -07:00
env_mirror.cc Change RocksDB License 2017-07-15 16:11:23 -07:00
env_mirror_test.cc Change RocksDB License 2017-07-15 16:11:23 -07:00
env_timed.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
env_timed_test.cc fix memory leak in two_level_iterator 2018-04-15 17:26:26 -07: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