MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / replicationAbortSyncTransfer

Function replicationAbortSyncTransfer

src/replication.cpp:3848–3858  ·  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

3846 * Never call this function directly, use cancelReplicationHandshake() instead.
3847 */
3848void replicationAbortSyncTransfer(redisMaster *mi) {
3849 serverAssert(mi->repl_state == REPL_STATE_TRANSFER);
3850 undoConnectWithMaster(mi);
3851 if (mi->repl_transfer_fd!=-1) {
3852 close(mi->repl_transfer_fd);
3853 bg_unlink(mi->repl_transfer_tmpfile);
3854 zfree(mi->repl_transfer_tmpfile);
3855 mi->repl_transfer_tmpfile = NULL;
3856 mi->repl_transfer_fd = -1;
3857 }
3858}
3859
3860/* This function aborts a non blocking replication attempt if there is one
3861 * in progress, by canceling the non-blocking connect attempt or

Callers 1

Calls 3

undoConnectWithMasterFunction · 0.85
bg_unlinkFunction · 0.85
zfreeFunction · 0.85

Tested by

no test coverage detected