replication.c comment: run_id -> replid.

This commit is contained in:
WuYunlong 2018-03-03 10:20:37 +08:00
parent 84b281209a
commit 9f36880837
1 changed files with 6 additions and 6 deletions

View File

@ -466,7 +466,7 @@ int masterTryPartialResynchronization(client *c) {
(strcasecmp(master_replid, server.replid2) ||
psync_offset > server.second_replid_offset))
{
/* Run id "?" is used by slaves that want to force a full resync. */
/* Replid "?" is used by slaves that want to force a full resync. */
if (master_replid[0] != '?') {
if (strcasecmp(master_replid, server.replid) &&
strcasecmp(master_replid, server.replid2))
@ -1362,7 +1362,7 @@ char *sendSynchronousCommand(int flags, int fd, ...) {
/* Try a partial resynchronization with the master if we are about to reconnect.
* If there is no cached master structure, at least try to issue a
* "PSYNC ? -1" command in order to trigger a full resync using the PSYNC
* command in order to obtain the master run id and the master replication
* command in order to obtain the master replid and the master replication
* global offset.
*
* This function is designed to be called from syncWithMaster(), so the
@ -1390,7 +1390,7 @@ char *sendSynchronousCommand(int flags, int fd, ...) {
*
* PSYNC_CONTINUE: If the PSYNC command succeded and we can continue.
* PSYNC_FULLRESYNC: If PSYNC is supported but a full resync is needed.
* In this case the master run_id and global replication
* In this case the master replid and global replication
* offset is saved.
* PSYNC_NOT_SUPPORTED: If the server does not understand PSYNC at all and
* the caller should fall back to SYNC.
@ -1421,7 +1421,7 @@ int slaveTryPartialResynchronization(int fd, int read_reply) {
/* Writing half */
if (!read_reply) {
/* Initially set master_initial_offset to -1 to mark the current
* master run_id and offset as not valid. Later if we'll be able to do
* master replid and offset as not valid. Later if we'll be able to do
* a FULL resync using the PSYNC command we'll set the offset at the
* right value, so that this information will be propagated to the
* client structure representing the master into server.master. */
@ -1462,7 +1462,7 @@ int slaveTryPartialResynchronization(int fd, int read_reply) {
if (!strncmp(reply,"+FULLRESYNC",11)) {
char *replid = NULL, *offset = NULL;
/* FULL RESYNC, parse the reply in order to extract the run id
/* FULL RESYNC, parse the reply in order to extract the replid
* and the replication offset. */
replid = strchr(reply,' ');
if (replid) {
@ -1749,7 +1749,7 @@ void syncWithMaster(aeEventLoop *el, int fd, void *privdata, int mask) {
/* Try a partial resynchonization. If we don't have a cached master
* slaveTryPartialResynchronization() will at least try to use PSYNC
* to start a full resynchronization so that we get the master run id
* to start a full resynchronization so that we get the master replid
* and the global offset, to try a partial resync at the next
* reconnection attempt. */
if (server.repl_state == REPL_STATE_SEND_PSYNC) {