Skip to content

Commit d87e598

Browse files
archang19facebook-github-bot
authored andcommitted
Update error logging and status reporting for unsupported iouring (#13936)
Summary: We should add error logging to be able to pinpoint why RocksDB is returning status `NotSupported` for `ReadAsync`. Pull Request resolved: #13936 Test Plan: Look at logs (and client logs of error status) Reviewed By: anand1976 Differential Revision: D82141529 Pulled By: archang19 fbshipit-source-id: c71b70967457be35ef5168321d449f96b2b9441d
1 parent f46242c commit d87e598

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

env/io_posix.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,8 @@ IOStatus PosixRandomAccessFile::ReadAsync(
935935

936936
// Init failed, platform doesn't support io_uring.
937937
if (iu == nullptr) {
938-
return IOStatus::NotSupported("ReadAsync");
938+
fprintf(stderr, "failed to init io_uring\n");
939+
return IOStatus::NotSupported("ReadAsync: failed to init io_uring");
939940
}
940941

941942
// Allocate io_handle.
@@ -978,7 +979,8 @@ IOStatus PosixRandomAccessFile::ReadAsync(
978979
(void)cb_arg;
979980
(void)io_handle;
980981
(void)del_fn;
981-
return IOStatus::NotSupported("ReadAsync");
982+
return IOStatus::NotSupported(
983+
"ReadAsync: ROCKSDB_IOURING_PRESENT is not set");
982984
#endif
983985
}
984986

0 commit comments

Comments
 (0)