Skip to content

Commit

Permalink
Merge branch 'unstable' into RELEASE_6
Browse files Browse the repository at this point in the history
  • Loading branch information
christianEQ committed Jan 10, 2022
2 parents 5169f97 + b4528b7 commit e69f102
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4289,7 +4289,14 @@ RedisModuleCallReply *RM_Call(RedisModuleCtx *ctx, const char *cmdname, const ch
if (!(flags & REDISMODULE_ARGV_NO_REPLICAS))
call_flags |= CMD_CALL_PROPAGATE_REPL;
}

{
aeAcquireLock();
std::unique_lock<fastlock> ul(c->lock);
call(c,call_flags);
aeReleaseLock();
}

g_pserver->replication_allowed = prev_replication_allowed;

serverAssert((c->flags & CLIENT_BLOCKED) == 0);
Expand Down
2 changes: 2 additions & 0 deletions src/networking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1942,7 +1942,9 @@ void ProcessPendingAsyncWrites()
bool fResult = c->postFunction([](client *c) {
c->fPendingAsyncWriteHandler = false;
clientInstallWriteHandler(c);
c->lock.unlock();
handleClientsWithPendingWrites(c->iel, g_pserver->aof_state);
c->lock.lock();
}, false);

if (!fResult)
Expand Down
1 change: 0 additions & 1 deletion src/redis-benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1984,7 +1984,6 @@ int main(int argc, const char **argv) {
} while(config.loop);
zfree(data);

zfree(data);
if (config.redis_config != NULL) freeRedisConfig(config.redis_config);

return 0;
Expand Down
4 changes: 4 additions & 0 deletions src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6562,7 +6562,11 @@ void *timeThreadMain(void*) {
}
}
updateCachedTime();
#if defined(__APPLE__)
nanosleep(&delay, nullptr);
#else
clock_nanosleep(CLOCK_MONOTONIC, 0, &delay, NULL);
#endif
}
}

Expand Down

0 comments on commit e69f102

Please sign in to comment.