示例#1
0
/* send node request signal */
static void
wd_node_request_signal(WD_PACKET_NO packet_no, WdNodeInfo *node)
{
	switch (packet_no)
	{
		case WD_FAILBACK_REQUEST:
			send_failback_request(node->node_id_set[0]);
			break;
		case WD_DEGENERATE_BACKEND:
			degenerate_backend_set(node->node_id_set, node->node_num);
			break;
		case WD_PROMOTE_BACKEND:
			promote_backend(node->node_id_set[0]);
			break;
		default:
			pool_error("wd_node_request_signal: unknown packet number");
			break;
	}
}
示例#2
0
void notice_backend_error(int node_id)
{
	int n = node_id;

	degenerate_backend_set(&n, 1);
}