MCPcopy Create free account
hub / github.com/F-Stack/f-stack / clearReplicationId2

Function clearReplicationId2

app/redis-6.2.6/src/replication.c:1392–1396  ·  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

1390 * example, after a full resynchronization, when we start a new replication
1391 * history. */
1392void clearReplicationId2(void) {
1393 memset(server.replid2,'0',sizeof(server.replid));
1394 server.replid2[CONFIG_RUN_ID_SIZE] = '\0';
1395 server.second_replid_offset = -1;
1396}
1397
1398/* Use the current replication ID / offset as secondary replication
1399 * 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 1

memsetFunction · 0.85

Tested by

no test coverage detected