431e8afba7
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 |
||
---|---|---|
.. | ||
blob_constants.h | ||
blob_file_addition_test.cc | ||
blob_file_addition.cc | ||
blob_file_addition.h | ||
blob_file_builder_test.cc | ||
blob_file_builder.cc | ||
blob_file_builder.h | ||
blob_file_cache_test.cc | ||
blob_file_cache.cc | ||
blob_file_cache.h | ||
blob_file_garbage_test.cc | ||
blob_file_garbage.cc | ||
blob_file_garbage.h | ||
blob_file_meta.cc | ||
blob_file_meta.h | ||
blob_file_reader_test.cc | ||
blob_file_reader.cc | ||
blob_file_reader.h | ||
blob_index.h | ||
blob_log_format.cc | ||
blob_log_format.h | ||
blob_log_sequential_reader.cc | ||
blob_log_sequential_reader.h | ||
blob_log_writer.cc | ||
blob_log_writer.h | ||
db_blob_basic_test.cc | ||
db_blob_index_test.cc |