Hold the AE lock until we process the repl backlog after a command
Former-commit-id: 4893eedacbf5f9210d02361ed07b9beee0c9f655
This commit is contained in:
parent
0d8c7c7182
commit
7630b63f06
@ -2326,7 +2326,8 @@ void commandProcessed(client *c) {
|
|||||||
int processCommandAndResetClient(client *c, int flags) {
|
int processCommandAndResetClient(client *c, int flags) {
|
||||||
int deadclient = 0;
|
int deadclient = 0;
|
||||||
serverTL->current_client = c;
|
serverTL->current_client = c;
|
||||||
if (processCommand(c, flags) == C_OK) {
|
AeLocker locker;
|
||||||
|
if (processCommand(c, flags, locker) == C_OK) {
|
||||||
commandProcessed(c);
|
commandProcessed(c);
|
||||||
}
|
}
|
||||||
if (serverTL->current_client == NULL) deadclient = 1;
|
if (serverTL->current_client == NULL) deadclient = 1;
|
||||||
|
@ -3621,8 +3621,7 @@ void call(client *c, int flags) {
|
|||||||
* If C_OK is returned the client is still alive and valid and
|
* If C_OK is returned the client is still alive and valid and
|
||||||
* other operations can be performed by the caller. Otherwise
|
* other operations can be performed by the caller. Otherwise
|
||||||
* if C_ERR is returned the client was destroyed (i.e. after QUIT). */
|
* if C_ERR is returned the client was destroyed (i.e. after QUIT). */
|
||||||
int processCommand(client *c, int callFlags) {
|
int processCommand(client *c, int callFlags, AeLocker &locker) {
|
||||||
AeLocker locker;
|
|
||||||
AssertCorrectThread(c);
|
AssertCorrectThread(c);
|
||||||
|
|
||||||
if (moduleHasCommandFilters())
|
if (moduleHasCommandFilters())
|
||||||
|
@ -2542,7 +2542,7 @@ int getMaxmemoryState(size_t *total, size_t *logical, size_t *tofree, float *lev
|
|||||||
size_t freeMemoryGetNotCountedMemory();
|
size_t freeMemoryGetNotCountedMemory();
|
||||||
int freeMemoryIfNeeded(void);
|
int freeMemoryIfNeeded(void);
|
||||||
int freeMemoryIfNeededAndSafe(void);
|
int freeMemoryIfNeededAndSafe(void);
|
||||||
int processCommand(client *c, int callFlags);
|
int processCommand(client *c, int callFlags, class AeLocker &locker);
|
||||||
void setupSignalHandlers(void);
|
void setupSignalHandlers(void);
|
||||||
struct redisCommand *lookupCommand(sds name);
|
struct redisCommand *lookupCommand(sds name);
|
||||||
struct redisCommand *lookupCommandByCString(const char *s);
|
struct redisCommand *lookupCommandByCString(const char *s);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user