summaryrefslogtreecommitdiffstats
path: root/ctdb/server/ctdb_monitor.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2010-06-22 22:50:07 +0930
committerRusty Russell <rusty@rustcorp.com.au>2010-06-22 22:50:07 +0930
commiteb61b11497014fcf70ceac21cb2573b760458dd1 (patch)
tree1e6e52f545b5a6cf8dfbf1e233d4ccbfd6c7f6a4 /ctdb/server/ctdb_monitor.c
parentf7efc1f8e8942b3b51e392c565a76349dbd323d1 (diff)
downloadsamba-eb61b11497014fcf70ceac21cb2573b760458dd1.tar.gz
samba-eb61b11497014fcf70ceac21cb2573b760458dd1.tar.xz
samba-eb61b11497014fcf70ceac21cb2573b760458dd1.zip
speed startup: immediately run first monitor event after startup.
Once we've done a startup, we need to run a monitor event successfully to be marked as healthy. Rather than wait the usual 5 seconds, run it immediately (which will then reset next_interval to 5 seconds). Seconds between ctdbd first log message and node healthy: BEFORE: 23.58 AFTER: 18.09 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (This used to be ctdb commit c8651494febcb1c9e558b2002e2a72c2bf547c06)
Diffstat (limited to 'ctdb/server/ctdb_monitor.c')
-rw-r--r--ctdb/server/ctdb_monitor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ctdb/server/ctdb_monitor.c b/ctdb/server/ctdb_monitor.c
index 48a3f32ac8..12ef36fb41 100644
--- a/ctdb/server/ctdb_monitor.c
+++ b/ctdb/server/ctdb_monitor.c
@@ -202,7 +202,7 @@ static void ctdb_startup_callback(struct ctdb_context *ctdb, int status, void *p
} else if (status == 0) {
DEBUG(DEBUG_NOTICE,("startup event OK - enabling monitoring\n"));
ctdb->done_startup = true;
- ctdb->monitor->next_interval = 5;
+ ctdb->monitor->next_interval = 0;
ctdb_run_notification_script(ctdb, "startup");
}