Free a cached master, called when there are no longer the conditions for * a partial resync on reconnection. */
| 2974 | /* Free a cached master, called when there are no longer the conditions for |
| 2975 | * a partial resync on reconnection. */ |
| 2976 | void replicationDiscardCachedMaster(void) { |
| 2977 | if (server.cached_master == NULL) return; |
| 2978 | |
| 2979 | serverLog(LL_NOTICE,"Discarding previously cached master state."); |
| 2980 | server.cached_master->flags &= ~CLIENT_MASTER; |
| 2981 | freeClient(server.cached_master); |
| 2982 | server.cached_master = NULL; |
| 2983 | } |
| 2984 | |
| 2985 | /* Turn the cached master into the current master, using the file descriptor |
| 2986 | * passed as argument as the socket for the new master. |
no test coverage detected