Make async commands runtime configurable
Former-commit-id: 23bafb5f7c3c9805581f4bf09d9d5136898c2883
This commit is contained in:
parent
cf85a9cd02
commit
dcbd4c547f
@ -2730,6 +2730,7 @@ standardConfig configs[] = {
|
||||
createBoolConfig("disable-thp", NULL, MODIFIABLE_CONFIG, g_pserver->disable_thp, 1, NULL, NULL),
|
||||
createBoolConfig("cluster-allow-replica-migration", NULL, MODIFIABLE_CONFIG, g_pserver->cluster_allow_replica_migration, 1, NULL, NULL),
|
||||
createBoolConfig("replica-announced", NULL, MODIFIABLE_CONFIG, g_pserver->replica_announced, 1, NULL, NULL),
|
||||
createBoolConfig("enable-async-commands", NULL, MODIFIABLE_CONFIG, g_pserver->enable_async_commands, 1, NULL, NULL),
|
||||
|
||||
/* String Configs */
|
||||
createStringConfig("aclfile", NULL, IMMUTABLE_CONFIG, ALLOW_EMPTY_STRING, g_pserver->acl_filename, "", NULL, NULL),
|
||||
|
@ -2710,6 +2710,7 @@ void readQueryFromClient(connection *conn) {
|
||||
|
||||
if (cserver.cthreads > 1) {
|
||||
parseClientCommandBuffer(c);
|
||||
if (g_pserver->enable_async_commands)
|
||||
processInputBuffer(c, false, CMD_CALL_SLOWLOG | CMD_CALL_STATS | CMD_CALL_ASYNC);
|
||||
if (!c->vecqueuedcmd.empty())
|
||||
serverTL->vecclientsProcess.push_back(c);
|
||||
|
@ -2567,6 +2567,8 @@ struct redisServer {
|
||||
int target_replica_port; /* Failover target port */
|
||||
int failover_state; /* Failover state */
|
||||
|
||||
int enable_async_commands;
|
||||
|
||||
long long repl_batch_offStart = -1;
|
||||
long long repl_batch_idxStart = -1;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user