rocksdb/utilities/blob_db
Levi Tamasi 431e8afba7 Do not explicitly flush blob files when using the integrated BlobDB (#7892)
Summary:
In the original stacked BlobDB implementation, which writes blobs to blob files
immediately and treats blob files as logs, it makes sense to flush the file after
writing each blob to protect against process crashes; however, in the integrated
implementation, which builds blob files in the background jobs, this unnecessarily
reduces performance. This patch fixes this by simply adding a `do_flush` flag to
`BlobLogWriter`, which is set to `true` by the stacked implementation and to `false`
by the new code. Note: the change itself is trivial but the tests needed some work;
since in the new implementation, blobs are now buffered, adding a blob to
`BlobFileBuilder` is no longer guaranteed to result in an actual I/O. Therefore, we can
no longer rely on `FaultInjectionTestEnv` when testing failure cases; instead, we
manipulate the return values of I/O methods directly using `SyncPoint`s.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/7892

Test Plan: `make check`

Reviewed By: jay-zhuang

Differential Revision: D26022814

Pulled By: ltamasi

fbshipit-source-id: b3dce419f312137fa70d84cdd9b908fd5d60d8cd
2021-01-25 13:32:33 -08:00
..
blob_compaction_filter.cc In ParseInternalKey(), include corrupt key info in Status (#7515) 2020-10-28 10:12:58 -07:00
blob_compaction_filter.h Move the blob file format related classes to the main namespace, rename reader/writer (#7086) 2020-07-06 17:18:14 -07:00
blob_db_gc_stats.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
blob_db_impl_filesnapshot.cc Expose the start of the expiration range for TTL blob files through LiveFileMetaData (#7365) 2020-09-10 11:33:33 -07:00
blob_db_impl.cc Do not explicitly flush blob files when using the integrated BlobDB (#7892) 2021-01-25 13:32:33 -08:00
blob_db_impl.h Clean up BlobLogReader and rename it to BlobLogSequentialReader (#7517) 2020-10-07 17:48:16 -07:00
blob_db_iterator.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
blob_db_listener.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
blob_db_test.cc Fixing Windows build using CMake (#7854) 2021-01-15 17:53:16 -08:00
blob_db.cc Destroy any ColumnFamilyHandles in BlobDB::Open upon error (#6763) 2020-04-27 16:45:13 -07:00
blob_db.h Move kNoExpiration to blob_db.h (#7018) 2020-06-23 13:45:06 -07:00
blob_dump_tool.cc Make StringEnv, StringSink, StringSource use FS classes (#7786) 2021-01-04 16:01:01 -08:00
blob_dump_tool.h Move blob_log_{format,reader,writer}.{cc,h} to db/blob/ (#6960) 2020-06-09 15:16:05 -07:00
blob_file.cc Add more tests to the ASC pass list (#7834) 2021-01-07 15:22:53 -08:00
blob_file.h Clean up BlobLogReader and rename it to BlobLogSequentialReader (#7517) 2020-10-07 17:48:16 -07:00