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

Function clearReplicationId2

src/replication.cpp:2276–2280  ·  view source on GitHub ↗

Clear (invalidate) the secondary replication ID. This happens, for * example, after a full resynchronization, when we start a new replication * history. */

Source from the content-addressed store, hash-verified

2274 * example, after a full resynchronization, when we start a new replication
2275 * history. */
2276void clearReplicationId2(void) {
2277 memset(g_pserver->replid2,'0',sizeof(g_pserver->replid));
2278 g_pserver->replid2[CONFIG_RUN_ID_SIZE] = '\0';
2279 g_pserver->second_replid_offset = -1;
2280}
2281
2282/* Use the current replication ID / offset as secondary replication
2283 * ID, and change the current one in order to start a new history.

Callers 5

syncCommandFunction · 0.85
readSyncBulkPayloadFunction · 0.85
replicationCronFunction · 0.85
initServerConfigFunction · 0.85
debugCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected