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

Function undoConnectWithMaster

src/replication.cpp:3834–3843  ·  view source on GitHub ↗

This function can be called when a non blocking connection is currently * in progress to undo it. * Never call this function directly, use cancelReplicationHandshake() instead. */

Source from the content-addressed store, hash-verified

3832 * Never call this function directly, use cancelReplicationHandshake() instead.
3833 */
3834void undoConnectWithMaster(redisMaster *mi) {
3835 serverAssert(GlobalLocksAcquired());
3836 auto conn = mi->repl_transfer_s;
3837 connSetPrivateData(conn, nullptr);
3838 mi->repl_transfer_s = NULL;
3839 int result = aePostFunction(g_pserver->rgthreadvar[mi->ielReplTransfer].el, [conn]{
3840 connClose(conn);
3841 }, false);
3842 serverAssert(result == AE_OK);
3843}
3844
3845/* Abort the async download of the bulk dataset while SYNC-ing with master.
3846 * Never call this function directly, use cancelReplicationHandshake() instead.

Callers 2

Calls 4

GlobalLocksAcquiredFunction · 0.85
connSetPrivateDataFunction · 0.85
aePostFunctionFunction · 0.85
connCloseFunction · 0.85

Tested by

no test coverage detected