rocksdb/db/blob
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_constants.h Move BlobDB related files under db/ to db/blob/ (#6519) 2020-03-12 11:00:56 -07:00
blob_file_addition_test.cc Move BlobDB related files under db/ to db/blob/ (#6519) 2020-03-12 11:00:56 -07:00
blob_file_addition.cc Move BlobDB related files under db/ to db/blob/ (#6519) 2020-03-12 11:00:56 -07:00
blob_file_addition.h Move BlobDB related files under db/ to db/blob/ (#6519) 2020-03-12 11:00:56 -07:00
blob_file_builder_test.cc Do not explicitly flush blob files when using the integrated BlobDB (#7892) 2021-01-25 13:32:33 -08:00
blob_file_builder.cc Do not explicitly flush blob files when using the integrated BlobDB (#7892) 2021-01-25 13:32:33 -08:00
blob_file_builder.h Integrate blob file writing with the flush logic (#7345) 2020-09-14 21:11:43 -07:00
blob_file_cache_test.cc Do not explicitly flush blob files when using the integrated BlobDB (#7892) 2021-01-25 13:32:33 -08:00
blob_file_cache.cc Introduce BlobFileCache and add support for blob files to Get() (#7540) 2020-10-15 13:04:47 -07:00
blob_file_cache.h Introduce BlobFileCache and add support for blob files to Get() (#7540) 2020-10-15 13:04:47 -07:00
blob_file_garbage_test.cc Move BlobDB related files under db/ to db/blob/ (#6519) 2020-03-12 11:00:56 -07:00
blob_file_garbage.cc Move BlobDB related files under db/ to db/blob/ (#6519) 2020-03-12 11:00:56 -07:00
blob_file_garbage.h Move BlobDB related files under db/ to db/blob/ (#6519) 2020-03-12 11:00:56 -07:00
blob_file_meta.cc Maintain the set of linked SSTs in BlobFileMetaData (#6945) 2020-06-12 09:54:39 -07:00
blob_file_meta.h Maintain the set of linked SSTs in BlobFileMetaData (#6945) 2020-06-12 09:54:39 -07:00
blob_file_reader_test.cc Do not explicitly flush blob files when using the integrated BlobDB (#7892) 2021-01-25 13:32:33 -08:00
blob_file_reader.cc Introduce a blob file reader class (#7461) 2020-10-07 15:44:53 -07:00
blob_file_reader.h Introduce a blob file reader class (#7461) 2020-10-07 15:44:53 -07:00
blob_index.h Introduce a blob file reader class (#7461) 2020-10-07 15:44:53 -07:00
blob_log_format.cc Introduce BlobFileCache and add support for blob files to Get() (#7540) 2020-10-15 13:04:47 -07:00
blob_log_format.h Introduce BlobFileCache and add support for blob files to Get() (#7540) 2020-10-15 13:04:47 -07:00
blob_log_sequential_reader.cc Introduce BlobFileCache and add support for blob files to Get() (#7540) 2020-10-15 13:04:47 -07:00
blob_log_sequential_reader.h Clean up BlobLogReader and rename it to BlobLogSequentialReader (#7517) 2020-10-07 17:48:16 -07:00
blob_log_writer.cc Do not explicitly flush blob files when using the integrated BlobDB (#7892) 2021-01-25 13:32:33 -08:00
blob_log_writer.h Do not explicitly flush blob files when using the integrated BlobDB (#7892) 2021-01-25 13:32:33 -08:00
db_blob_basic_test.cc Add initial blob support to batched MultiGet (#7766) 2020-12-14 13:48:22 -08:00
db_blob_index_test.cc Add further tests to ASSERT_STATUS_CHECKED (2) (#7698) 2020-12-09 21:21:16 -08:00