@@ -77,6 +77,13 @@ struct BackupEngineOptions {
77
77
// Default: true
78
78
bool backup_log_files;
79
79
80
+ // Size of the buffer used for reading files.
81
+ // Enables optimally configuring the IO size based on the storage backend.
82
+ // If specified, takes precendence over the rate limiter burst size (if
83
+ // specified) as well as kDefaultCopyFileBufferSize.
84
+ // Default: 0
85
+ uint64_t io_buffer_size;
86
+
80
87
// Max bytes that can be transferred in a second during backup.
81
88
// If 0, go as fast as you can
82
89
// This limit only applies to writes. To also limit reads,
@@ -228,8 +235,9 @@ struct BackupEngineOptions {
228
235
const std::string& _backup_dir, Env* _backup_env = nullptr ,
229
236
bool _share_table_files = true , Logger* _info_log = nullptr ,
230
237
bool _sync = true , bool _destroy_old_data = false ,
231
- bool _backup_log_files = true , uint64_t _backup_rate_limit = 0 ,
232
- uint64_t _restore_rate_limit = 0 , int _max_background_operations = 1 ,
238
+ bool _backup_log_files = true , uint64_t _io_buffer_size = 0 ,
239
+ uint64_t _backup_rate_limit = 0 , uint64_t _restore_rate_limit = 0 ,
240
+ int _max_background_operations = 1 ,
233
241
uint64_t _callback_trigger_interval_size = 4 * 1024 * 1024 ,
234
242
int _max_valid_backups_to_open = INT_MAX,
235
243
ShareFilesNaming _share_files_with_checksum_naming =
@@ -241,6 +249,7 @@ struct BackupEngineOptions {
241
249
sync(_sync),
242
250
destroy_old_data(_destroy_old_data),
243
251
backup_log_files(_backup_log_files),
252
+ io_buffer_size(_io_buffer_size),
244
253
backup_rate_limit(_backup_rate_limit),
245
254
restore_rate_limit(_restore_rate_limit),
246
255
share_files_with_checksum(true ),
0 commit comments