1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

tweak timeouts

(This used to be ctdb commit 54a90797469f56d796efd82e9294efff3c5dabcc)
This commit is contained in:
Andrew Tridgell 2007-05-27 09:43:25 +10:00
parent 7ff6e17ca1
commit 647540253e
2 changed files with 3 additions and 2 deletions

View File

@ -36,6 +36,7 @@ static void timeout_func(struct event_context *ev, struct timed_event *te,
}
#define CONTROL_TIMEOUT() timeval_current_ofs(5, 0)
#define MONITOR_TIMEOUT() timeval_current_ofs(1, 0)
static int set_recovery_mode(struct ctdb_context *ctdb, struct ctdb_node_map *nodemap, uint32_t rec_mode)
{
@ -699,7 +700,7 @@ again:
/* we only check for recovery once every second */
timed_out = 0;
event_add_timed(ctdb->ev, mem_ctx, CONTROL_TIMEOUT(), timeout_func, ctdb);
event_add_timed(ctdb->ev, mem_ctx, MONITOR_TIMEOUT(), timeout_func, ctdb);
while (!timed_out) {
event_loop_once(ctdb->ev);
}

View File

@ -334,7 +334,7 @@ struct ctdb_db_context {
#define CTDB_TRAVERSE_TIMEOUT 20
/* timeout between dead-node monitoring events */
#define CTDB_MONITORING_TIMEOUT 3
#define CTDB_MONITORING_TIMEOUT 2
/* number of monitoring timeouts before a node is considered dead */
#define CTDB_MONITORING_DEAD_COUNT 2