mirror of
http://github.com/valkey-io/valkey
synced 2024-11-22 09:17:20 +00:00
Clarify comment in change fixing #4323.
This commit is contained in:
parent
368124e8fa
commit
1c60b7a671
@ -75,8 +75,12 @@ slowlogEntry *slowlogCreateEntry(client *c, robj **argv, int argc, long long dur
|
|||||||
} else if (argv[j]->refcount == OBJ_SHARED_REFCOUNT) {
|
} else if (argv[j]->refcount == OBJ_SHARED_REFCOUNT) {
|
||||||
se->argv[j] = argv[j];
|
se->argv[j] = argv[j];
|
||||||
} else {
|
} else {
|
||||||
/* Duplicate a string object,
|
/* Here we need to dupliacate the string objects composing the
|
||||||
* avoid memory leak for lazyfree. */
|
* argument vector of the command, because those may otherwise
|
||||||
|
* end shared with string objects stored into keys. Having
|
||||||
|
* shared objects between any part of Redis, and the data
|
||||||
|
* structure holding the data, is a problem: FLUSHALL ASYNC
|
||||||
|
* may release the shared string object and create a race. */
|
||||||
se->argv[j] = dupStringObject(argv[j]);
|
se->argv[j] = dupStringObject(argv[j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user