Merge branch 'unstable' into RELEASE_6

Former-commit-id: e69f1023a96e0da8880be4afb3107c3d8b6b9a75
This commit is contained in:
christianEQ 2022-01-10 23:54:30 +00:00
commit 6122cce93b
4 changed files with 13 additions and 1 deletions

View File

@ -4289,7 +4289,14 @@ RedisModuleCallReply *RM_Call(RedisModuleCtx *ctx, const char *cmdname, const ch
if (!(flags & REDISMODULE_ARGV_NO_REPLICAS)) if (!(flags & REDISMODULE_ARGV_NO_REPLICAS))
call_flags |= CMD_CALL_PROPAGATE_REPL; call_flags |= CMD_CALL_PROPAGATE_REPL;
} }
{
aeAcquireLock();
std::unique_lock<fastlock> ul(c->lock);
call(c,call_flags); call(c,call_flags);
aeReleaseLock();
}
g_pserver->replication_allowed = prev_replication_allowed; g_pserver->replication_allowed = prev_replication_allowed;
serverAssert((c->flags & CLIENT_BLOCKED) == 0); serverAssert((c->flags & CLIENT_BLOCKED) == 0);

View File

@ -1942,7 +1942,9 @@ void ProcessPendingAsyncWrites()
bool fResult = c->postFunction([](client *c) { bool fResult = c->postFunction([](client *c) {
c->fPendingAsyncWriteHandler = false; c->fPendingAsyncWriteHandler = false;
clientInstallWriteHandler(c); clientInstallWriteHandler(c);
c->lock.unlock();
handleClientsWithPendingWrites(c->iel, g_pserver->aof_state); handleClientsWithPendingWrites(c->iel, g_pserver->aof_state);
c->lock.lock();
}, false); }, false);
if (!fResult) if (!fResult)

View File

@ -1984,7 +1984,6 @@ int main(int argc, const char **argv) {
} while(config.loop); } while(config.loop);
zfree(data); zfree(data);
zfree(data);
if (config.redis_config != NULL) freeRedisConfig(config.redis_config); if (config.redis_config != NULL) freeRedisConfig(config.redis_config);
return 0; return 0;

View File

@ -6562,7 +6562,11 @@ void *timeThreadMain(void*) {
} }
} }
updateCachedTime(); updateCachedTime();
#if defined(__APPLE__)
nanosleep(&delay, nullptr);
#else
clock_nanosleep(CLOCK_MONOTONIC, 0, &delay, NULL); clock_nanosleep(CLOCK_MONOTONIC, 0, &delay, NULL);
#endif
} }
} }