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

Function rdbPipeWriteHandlerConnRemoved

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

Remove one write handler from the list of connections waiting to be writable * during rdb pipe transfer. */

Source from the content-addressed store, hash-verified

1151/* Remove one write handler from the list of connections waiting to be writable
1152 * during rdb pipe transfer. */
1153void rdbPipeWriteHandlerConnRemoved(struct connection *conn) {
1154 if (!connHasWriteHandler(conn))
1155 return;
1156 connSetWriteHandler(conn, NULL);
1157 client *slave = connGetPrivateData(conn);
1158 slave->repl_last_partial_write = 0;
1159 server.rdb_pipe_numconns_writing--;
1160 /* if there are no more writes for now for this conn, or write error: */
1161 if (server.rdb_pipe_numconns_writing == 0) {
1162 if (aeCreateFileEvent(server.el, server.rdb_pipe_read, AE_READABLE, rdbPipeReadHandler,NULL) == AE_ERR) {
1163 serverPanic("Unrecoverable error creating server.rdb_pipe_read file event.");
1164 }
1165 }
1166}
1167
1168/* Called in diskless master during transfer of data from the rdb pipe, when
1169 * the replica becomes writable again. */

Callers 2

rdbPipeWriteHandlerFunction · 0.85
unlinkClientFunction · 0.85

Calls 4

connHasWriteHandlerFunction · 0.85
connSetWriteHandlerFunction · 0.85
connGetPrivateDataFunction · 0.85
aeCreateFileEventFunction · 0.85

Tested by

no test coverage detected