You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This has almost always been used with server_connections: 1
A struct server can have more than one connection (struct conn), though it isn't recommended
When restoring a connection, the heartbeat patch checks if the connection is healthy. However, if a server has other healthy connections, it may not make sense to set the status of the entire server (server->fail) based on recent failures, and this changing server->fail due to an unrelated connection's status may violate some assumptions about the state machine
void
server_restore(struct context *ctx, struct conn *conn)
{
struct server *server;
server = (struct server *)(conn->owner);
ASSERT(server != NULL);
if (server->fail == FAIL_STATUS_NORMAL) {
return;
}
/* If the server's in an error state: On adding a server back into the pool send a heartbeat command to check if it is still healthy and should still be in the pool (?) */
if (send_heartbeat(ctx, conn, server) != NC_OK) {
log_error("Unexpectedly failed to send a heartbeat to the server to attempt reconnection");
}
}
This has almost always been used with
server_connections: 1
A
struct server
can have more than one connection (struct conn
), though it isn't recommendedWhen restoring a connection, the heartbeat patch checks if the connection is healthy. However, if a server has other healthy connections, it may not make sense to set the status of the entire server (server->fail) based on recent failures, and this changing server->fail due to an unrelated connection's status may violate some assumptions about the state machine
The text was updated successfully, but these errors were encountered: