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. */
| 2265 | * slaves, so the command should be called when something happens that |
| 2266 | * alters the current story of the dataset. */ |
| 2267 | void changeReplicationId(void) { |
| 2268 | getRandomHexChars(g_pserver->replid,CONFIG_RUN_ID_SIZE); |
| 2269 | g_pserver->replid[CONFIG_RUN_ID_SIZE] = '\0'; |
| 2270 | saveMasterStatusToStorage(false); |
| 2271 | } |
| 2272 | |
| 2273 | /* Clear (invalidate) the secondary replication ID. This happens, for |
| 2274 | * example, after a full resynchronization, when we start a new replication |
no test coverage detected