rocksdb/utilities/blob_db
yiwu-arbug e5a1b727c0 Fix blob DB transaction usage while GC
Summary:
While GC, blob DB use optimistic transaction to delete or replace the index entry in LSM, to guarantee correctness if there's a normal write writing to the same key. However, the previous implementation doesn't call SetSnapshot() nor use GetForUpdate() of transaction API, instead it do its own sequence number checking before beginning the transaction. A normal write can sneak in after the sequence number check and overwrite the key, and the GC will delete or relocate the old version of the key by mistake. Update the code to property use GetForUpdate() to check the existing index entry.

After the patch the sequence number store with each blob record is useless, So I'm considering remove the sequence number from blob record, in another patch.
Closes https://github.com/facebook/rocksdb/pull/2703

Differential Revision: D5589178

Pulled By: yiwu-arbug

fbshipit-source-id: 8dc960cd5f4e61b36024ba7c32d05584ce149c24
2017-08-11 12:43:17 -07:00
..
blob_db_impl.cc Fix blob DB transaction usage while GC 2017-08-11 12:43:17 -07:00
blob_db_impl.h Fix blob DB transaction usage while GC 2017-08-11 12:43:17 -07:00
blob_db_test.cc Fix blob DB transaction usage while GC 2017-08-11 12:43:17 -07:00
blob_db.cc Dump Blob DB options to info log 2017-08-01 13:01:47 -07:00
blob_db.h Update all blob db TTL and timestamps to uint64_t 2017-08-03 17:57:30 -07:00
blob_dump_tool.cc Update all blob db TTL and timestamps to uint64_t 2017-08-03 17:57:30 -07:00
blob_dump_tool.h Change RocksDB License 2017-07-15 16:11:23 -07:00
blob_file.cc Update all blob db TTL and timestamps to uint64_t 2017-08-03 17:57:30 -07:00
blob_log_format.cc Update all blob db TTL and timestamps to uint64_t 2017-08-03 17:57:30 -07:00
blob_log_format.h Update all blob db TTL and timestamps to uint64_t 2017-08-03 17:57:30 -07:00
blob_log_reader.cc Fix blob DB transaction usage while GC 2017-08-11 12:43:17 -07:00
blob_log_reader.h Fix blob DB transaction usage while GC 2017-08-11 12:43:17 -07:00
blob_log_writer.cc Update all blob db TTL and timestamps to uint64_t 2017-08-03 17:57:30 -07:00
blob_log_writer.h Update all blob db TTL and timestamps to uint64_t 2017-08-03 17:57:30 -07:00
ttl_extractor.cc Move blob_db/ttl_extractor.h into blob_db/blob_db.h 2017-07-28 14:28:21 -07:00