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

Function replicationAbortSyncTransfer

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

Abort the async download of the bulk dataset while SYNC-ing with master. * Never call this function directly, use cancelReplicationHandshake() instead. */

Source from the content-addressed store, hash-verified

2565 * Never call this function directly, use cancelReplicationHandshake() instead.
2566 */
2567void replicationAbortSyncTransfer(void) {
2568 serverAssert(server.repl_state == REPL_STATE_TRANSFER);
2569 undoConnectWithMaster();
2570 if (server.repl_transfer_fd!=-1) {
2571 close(server.repl_transfer_fd);
2572 bg_unlink(server.repl_transfer_tmpfile);
2573 zfree(server.repl_transfer_tmpfile);
2574 server.repl_transfer_tmpfile = NULL;
2575 server.repl_transfer_fd = -1;
2576 }
2577}
2578
2579/* This function aborts a non blocking replication attempt if there is one
2580 * in progress, by canceling the non-blocking connect attempt or

Callers 1

Calls 4

undoConnectWithMasterFunction · 0.85
bg_unlinkFunction · 0.85
closeFunction · 0.70
zfreeFunction · 0.70

Tested by

no test coverage detected