summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfengweihao <[email protected]>2024-08-21 17:18:18 +0800
committerfengweihao <[email protected]>2024-08-21 17:18:18 +0800
commit1667169949f2aacd9e36cb191fce3e492443568b (patch)
tree3b727acc485ed043c80ea7a85ff3f6113f5d16e7
parentfb406eaf6166125575c1e957b2fbeaa881766851 (diff)
bugfix:When the thread’s ring buffer is full, an abnormal RPC timeout is set.v4.4.2
-rw-r--r--src/swarmkv.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/swarmkv.c b/src/swarmkv.c
index 34f3ae8..517ab73 100644
--- a/src/swarmkv.c
+++ b/src/swarmkv.c
@@ -159,7 +159,10 @@ static void exec_at_thread(struct swarmkv *db, const struct swarmkv_cmd *cmd, in
swarmkv_rpc_complete(db->rpc_mgr, cur_tid, sequence, reply);
swarmkv_reply_free(reply);
}
- swarmkv_rpc_set_timeout(rpc, db->opts->cluster_timeout_us + INTER_THREAD_RPC_TIMEOUT_AHEAD);
+ else
+ {
+ swarmkv_rpc_set_timeout(rpc, db->opts->cluster_timeout_us + INTER_THREAD_RPC_TIMEOUT_AHEAD);
+ }
}
static int spec_gettid(const struct swarmkv_cmd_spec *spec, const struct swarmkv_cmd *cmd, int nr_worker_threads)
{
@@ -400,7 +403,7 @@ void exec_cmd(struct swarmkv *db, const struct swarmkv_cmd *cmd, struct future *
struct swarmkv_reply *reply = NULL;
struct promise *p = NULL;
int cur_tid = swarmkv_gettid(db);
-
+
spec = swarmkv_command_table_get_spec_by_argv(db->mod_command_table, cmd->argc, cmd->argv);
if (!spec)
{