rocksdb/utilities/blob_db
Levi Tamasi 0a97125ec0 Fix data races in BlobDB (#5698)
Summary:
Some accesses to blob_files_ and open_ttl_files_ in BlobDBImpl, as well
as to expiration_range_ in BlobFile were not properly synchronized.
The patch fixes this and also makes sure the invariant that obsolete_files_
is a subset of blob_files_ holds even when an attempt to delete an obsolete
blob file fails.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/5698

Test Plan:
COMPILE_WITH_TSAN=1 make blob_db_test
gtest-parallel --repeat=1000 ./blob_db_test --gtest_filter="*ShutdownWait*"

The test fails with TSAN errors ~20 times out of 1000 without the patch but
completes successfully 1000 out of 1000 times with the fix.

Differential Revision: D16793235

Pulled By: ltamasi

fbshipit-source-id: 8034b987598d4fdc9f15098d4589cc49cde484e9
2019-08-14 16:10:36 -07:00
..
blob_compaction_filter.cc Apply modernize-use-override (2nd iteration) 2019-02-14 14:41:36 -08:00
blob_compaction_filter.h Blob DB: Improve FIFO eviction 2018-03-06 11:57:42 -08:00
blob_db_impl_filesnapshot.cc Move some logging related files to logging/ (#5387) 2019-05-31 17:23:59 -07:00
blob_db_impl.cc Fix data races in BlobDB (#5698) 2019-08-14 16:10:36 -07:00
blob_db_impl.h BlobDB::Open() should put all existing trash files to delete scheduler (#5103) 2019-03-26 10:53:19 -07:00
blob_db_iterator.h Change and clarify the relationship between Valid(), status() and Seek*() for all iterators. Also fix some bugs 2018-05-17 02:56:56 -07:00
blob_db_listener.h Blob DB: Improve FIFO eviction 2018-03-06 11:57:42 -08:00
blob_db_test.cc Move some memory related files from util/ to memory/ (#5382) 2019-05-30 17:44:09 -07:00
blob_db.cc simplify include directive involving inttypes (#5402) 2019-06-06 13:56:07 -07:00
blob_db.h Introduce a new MultiGet batching implementation (#5011) 2019-04-11 14:28:26 -07:00
blob_dump_tool.cc simplify include directive involving inttypes (#5402) 2019-06-06 13:56:07 -07:00
blob_dump_tool.h Ensure delete[] and not delete is used on buffer_ (#4647) 2018-11-07 11:59:50 -08:00
blob_file.cc simplify include directive involving inttypes (#5402) 2019-06-06 13:56:07 -07:00
blob_file.h BlobDB: handle IO error on read (#4410) 2018-09-20 16:58:45 -07:00
blob_index.h Blob DB: Inline small values in base DB 2017-10-26 12:30:54 -07:00
blob_log_format.cc utilities: Fix build failure with -Werror=maybe-uninitialized (#5074) 2019-03-18 11:35:06 -07:00
blob_log_format.h BlobDB: use char array instead of string as buffer (#4662) 2018-11-13 12:49:29 -08:00
blob_log_reader.cc Remove some "using std::..." from header files. (#5113) 2019-03-27 10:28:21 -07:00
blob_log_reader.h BlobDB: use char array instead of string as buffer (#4662) 2018-11-13 12:49:29 -08:00
blob_log_writer.cc Remove some "using std::..." from header files. (#5113) 2019-03-27 10:28:21 -07:00
blob_log_writer.h BlobDB: refactor DB open logic 2017-12-11 12:12:38 -08:00