You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In master-slave replication(1 master,1 slave), i find that master_repl_offset increases by 14 every 10 seconds(I did not do any write operations). e.g.
scaned the coed, i find that master_repl_offset increases by ping. without write operations,master_repl_offset is increased. i'm wondering if this is a mechanism or a bug?
sorry,i don't know much about this. i know that PING to the replications to ensure the connection between them,but i don't understand why ping needs to cause the increase of master_repl_offset. Shouldn't only the write operation cause the increase of master_repl_offset?
@polaris-alioth If we don't increase master_repl_offset that will cause master and repl to be out of sync.
the code that the replication sync repl offset with master
long long prev_offset = c->reploff;
if (c->flags & CLIENT_MASTER && !(c->flags & CLIENT_MULTI)) {
/* Update the applied replication offset of our master. */
c->reploff = c->read_reploff - sdslen(c->querybuf) + c->qb_pos;
}
In master-slave replication(1 master,1 slave), i find that
master_repl_offset
increases by 14 every 10 seconds(I did not do any write operations). e.g.scaned the coed, i find that
master_repl_offset
increases byping
. without write operations,master_repl_offset is increased. i'm wondering if this is a mechanism or a bug?The text was updated successfully, but these errors were encountered: