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

Function changeReplicationId

app/redis-6.2.6/src/replication.c:1384–1387  ·  view source on GitHub ↗

Change the current instance replication ID with a new, random one. * This will prevent successful PSYNCs between this master and other * slaves, so the command should be called when something happens that * alters the current story of the dataset. */

Source from the content-addressed store, hash-verified

1382 * slaves, so the command should be called when something happens that
1383 * alters the current story of the dataset. */
1384void changeReplicationId(void) {
1385 getRandomHexChars(server.replid,CONFIG_RUN_ID_SIZE);
1386 server.replid[CONFIG_RUN_ID_SIZE] = '\0';
1387}
1388
1389/* Clear (invalidate) the secondary replication ID. This happens, for
1390 * example, after a full resynchronization, when we start a new replication

Callers 5

syncCommandFunction · 0.85
shiftReplicationIdFunction · 0.85
replicationCronFunction · 0.85
initServerConfigFunction · 0.85
debugCommandFunction · 0.85

Calls 1

getRandomHexCharsFunction · 0.85

Tested by

no test coverage detected