MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / getPsyncInitialOffset

Function getPsyncInitialOffset

src/replication.cpp:841–843  ·  view source on GitHub ↗

Return the offset to provide as reply to the PSYNC command received * from the replica. The returned value is only valid immediately after * the BGSAVE process started and before executing any other command * from clients. */

Source from the content-addressed store, hash-verified

839 * the BGSAVE process started and before executing any other command
840 * from clients. */
841long long getPsyncInitialOffset(void) {
842 return g_pserver->master_repl_offset;
843}
844
845/* Send a FULLRESYNC reply in the specific case of a full resynchronization,
846 * as a side effect setup the replica for a full sync in different ways:

Callers 3

rdbSaveToSlavesSocketsFunction · 0.85
addReplicaMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected