mmap加载配置文件,uring实现持久化

This commit is contained in:
1iaan
2026-01-22 12:38:34 +00:00
parent f031e107b5
commit ba2004c258
15 changed files with 627 additions and 639 deletions

View File

@@ -432,6 +432,7 @@ int resp_dispatch(const resp_cmd_t *cmd, resp_value_t *out_value) {
cmd->argv[1].ptr, cmd->argv[1].len,
cmd->argv[2].ptr, cmd->argv[2].len);
if (r < 0) { *out_value = resp_error("ERR internal error"); return 0; }
else if (r == 1) { *out_value = resp_error("ERR key has exist"); return 0; }
*out_value = resp_simple("OK");
return 0;
}
@@ -485,6 +486,7 @@ int resp_dispatch(const resp_cmd_t *cmd, resp_value_t *out_value) {
cmd->argv[1].ptr, cmd->argv[1].len,
cmd->argv[2].ptr, cmd->argv[2].len);
if (r < 0) { *out_value = resp_error("ERR internal error"); return 0; }
else if (r == 1) { *out_value = resp_error("ERR key has exist"); return 0; }
*out_value = resp_simple("OK");
return 0;
}