From d87e598f70c960e3de2ea1984111f4fa35cbfee6 Mon Sep 17 00:00:00 2001 From: Andrew Chang Date: Wed, 10 Sep 2025 17:54:26 -0700 Subject: [PATCH] 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: https://github.com/facebook/rocksdb/pull/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 --- env/io_posix.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/env/io_posix.cc b/env/io_posix.cc index 0c7ddc73cd..6f3edf47a5 100644 --- a/env/io_posix.cc +++ b/env/io_posix.cc @@ -935,7 +935,8 @@ IOStatus PosixRandomAccessFile::ReadAsync( // Init failed, platform doesn't support io_uring. if (iu == nullptr) { - return IOStatus::NotSupported("ReadAsync"); + fprintf(stderr, "failed to init io_uring\n"); + return IOStatus::NotSupported("ReadAsync: failed to init io_uring"); } // Allocate io_handle. @@ -978,7 +979,8 @@ IOStatus PosixRandomAccessFile::ReadAsync( (void)cb_arg; (void)io_handle; (void)del_fn; - return IOStatus::NotSupported("ReadAsync"); + return IOStatus::NotSupported( + "ReadAsync: ROCKSDB_IOURING_PRESENT is not set"); #endif }