mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 18:35:46 +02:00
fix(server): exit gracefully when iouring not supported (#197)
fix(server): exit gracefully when iouring not supported #181 Signed-off-by: iko1 <me@remotecpp.dev>
This commit is contained in:
parent
9e36197742
commit
2b0869c16d
1 changed files with 8 additions and 0 deletions
|
@ -6,6 +6,7 @@
|
|||
#include <mimalloc-new-delete.h>
|
||||
#endif
|
||||
|
||||
#include <liburing.h>
|
||||
#include <absl/flags/usage.h>
|
||||
#include <absl/flags/usage_config.h>
|
||||
#include <absl/strings/match.h>
|
||||
|
@ -167,6 +168,13 @@ Usage: dragonfly [FLAGS]
|
|||
return 1;
|
||||
}
|
||||
|
||||
int iouring_res = io_uring_queue_init_params(0, nullptr, nullptr);
|
||||
if (-iouring_res == ENOSYS) {
|
||||
LOG(ERROR)
|
||||
<< "iouring system call interface is not supported. Exiting...";
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (GetFlag(FLAGS_dbnum) > dfly::kMaxDbId) {
|
||||
LOG(ERROR) << "dbnum is too big. Exiting...";
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue