File tree 4 files changed +13
-4
lines changed
4 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -516,7 +516,7 @@ jobs:
516
516
resource_class : large
517
517
steps :
518
518
- pre-steps
519
- - run : ulimit -S -n `ulimit -H -n` && make V=1 -j8 CRASH_TEST_EXT_ARGS='--duration=960 --max_key=2500000 --async_io =0' blackbox_crash_test_with_atomic_flush
519
+ - run : ulimit -S -n `ulimit -H -n` && make V=1 -j8 CRASH_TEST_EXT_ARGS='--duration=960 --max_key=2500000 --use_io_uring =0' blackbox_crash_test_with_atomic_flush
520
520
- post-steps
521
521
522
522
build-linux-crashtest-tiered-storage-bb :
@@ -526,7 +526,7 @@ jobs:
526
526
- pre-steps
527
527
- run :
528
528
name : " run crashtest"
529
- command : ulimit -S -n `ulimit -H -n` && make V=1 -j32 CRASH_TEST_EXT_ARGS='--duration=10800 --async_io =0' blackbox_crash_test_with_tiered_storage
529
+ command : ulimit -S -n `ulimit -H -n` && make V=1 -j32 CRASH_TEST_EXT_ARGS='--duration=10800 --use_io_uring =0' blackbox_crash_test_with_tiered_storage
530
530
no_output_timeout : 100m
531
531
- post-steps
532
532
@@ -537,7 +537,7 @@ jobs:
537
537
- pre-steps
538
538
- run :
539
539
name : " run crashtest"
540
- command : ulimit -S -n `ulimit -H -n` && make V=1 -j32 CRASH_TEST_EXT_ARGS='--duration=10800 --async_io =0' whitebox_crash_test_with_tiered_storage
540
+ command : ulimit -S -n `ulimit -H -n` && make V=1 -j32 CRASH_TEST_EXT_ARGS='--duration=10800 --use_io_uring =0' whitebox_crash_test_with_tiered_storage
541
541
no_output_timeout : 100m
542
542
- post-steps
543
543
Original file line number Diff line number Diff line change @@ -321,6 +321,7 @@ DECLARE_uint64(readahead_size);
321
321
DECLARE_uint64 (initial_auto_readahead_size);
322
322
DECLARE_uint64 (max_auto_readahead_size);
323
323
DECLARE_uint64 (num_file_reads_for_auto_readahead);
324
+ DECLARE_bool (use_io_uring);
324
325
325
326
constexpr long KB = 1024 ;
326
327
constexpr int kRandomValueMaxFactor = 3 ;
Original file line number Diff line number Diff line change @@ -1073,6 +1073,7 @@ DEFINE_uint64(stats_dump_period_sec,
1073
1073
ROCKSDB_NAMESPACE::Options ().stats_dump_period_sec,
1074
1074
"Gap between printing stats to log in seconds");
1075
1075
1076
- extern " C" bool RocksDbIOUringEnable () { return true ; }
1076
+ DEFINE_bool (use_io_uring, false , " Enable the use of IO uring on Posix" );
1077
+ extern " C" bool RocksDbIOUringEnable () { return FLAGS_use_io_uring; }
1077
1078
1078
1079
#endif // GFLAGS
Original file line number Diff line number Diff line change @@ -99,6 +99,13 @@ int db_stress_tool(int argc, char** argv) {
99
99
100
100
env_wrapper_guard = std::make_shared<CompositeEnvWrapper>(
101
101
raw_env, std::make_shared<DbStressFSWrapper>(raw_env->GetFileSystem ()));
102
+ if (!env_opts && !FLAGS_use_io_uring) {
103
+ // If using the default Env (Posix), wrap DbStressEnvWrapper with the
104
+ // legacy EnvWrapper. This is a workaround to prevent MultiGet and scans
105
+ // from failing when IO uring is disabled. The EnvWrapper
106
+ // has a default implementation of ReadAsync that redirects to Read.
107
+ env_wrapper_guard = std::make_shared<EnvWrapper>(env_wrapper_guard);
108
+ }
102
109
db_stress_env = env_wrapper_guard.get ();
103
110
104
111
FLAGS_rep_factory = StringToRepFactory (FLAGS_memtablerep.c_str ());
You can’t perform that action at this time.
0 commit comments