forked from facebook/rocksdb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add io_buffer_size to BackupEngineOptions (facebook#13236)
Summary: The RocksDB backup engine code currently derives the IO buffer size based on the following criteria: 1. If specified, use the rate limiter burst size 2. Otherwise, use the default size (5 MiB) We want to be able to explicitly choose the IO size based on the storage backend. We want the new criteria to be: 1. If specified, use the size in `BackupEngineOptions` 2. If specified, use the rate limiter burst size 3. Otherwise, use the default size (5 MiB) This PR adds a new option called `io_buffer_size` to `BackupEngineOptions` and updates the logic used to set the buffer size. Pull Request resolved: facebook#13236 Test Plan: I added a separate unit test and verified that we can either use the `io_buffer_size`, rate limiter burst size, or the default size. I decided to use a `TEST_SYNC_POINT_CALLBACK`. I considered the alternative of updating the `Read` implementation of `DummySequentialFile` / `CheckIOOptsSequentialFile` to check the value of `n`. However, that would have considerably complicated the whole test code, and we also do not need to be checking for this in every single test case. I think the `TEST_SYNC_POINT_CALLBACK` turned out to be quite elegant. Reviewed By: sushilpa Differential Revision: D67765000 Pulled By: archang19 fbshipit-source-id: 2122fab7379335de44ba4423af47aa0563635688
- Loading branch information
1 parent
3579d32
commit f7d32c1
Showing
4 changed files
with
84 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
unreleased_history/public_api_changes/backup_engine_options_io_buffer_size.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add `io_buffer_size` to BackupEngineOptions to enable optimal configuration of IO size |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters