mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
speed startup: add --sloppy-start.
The extra recovery interval wait was introduced in 821333afb458 but no explanation was provided in that message. Nonetheless, if starting the entire cluster for the first time, it should be safe to skip this. We use the commandline arg --sloppy-start which should discourage people from using it outside testing. Seconds between ctdbd first log message and node healthy: BEFORE: 16.10 AFTER: 4.03 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (This used to be ctdb commit 509e2e89ae233a0e91998d95267bf62f296a73cd)
This commit is contained in:
parent
ed31caffab
commit
8946028a07
@ -1299,6 +1299,7 @@ int32_t ctdb_control_recd_ping(struct ctdb_context *ctdb);
|
||||
int32_t ctdb_control_set_recmaster(struct ctdb_context *ctdb, uint32_t opcode, TDB_DATA indata);
|
||||
|
||||
extern int script_log_level;
|
||||
extern bool fast_start;
|
||||
|
||||
int32_t ctdb_control_get_event_script_status(struct ctdb_context *ctdb,
|
||||
uint32_t call_type,
|
||||
|
@ -245,7 +245,7 @@ static void ctdb_wait_until_recovered(struct event_context *ev, struct timed_eve
|
||||
}
|
||||
|
||||
|
||||
if (timeval_elapsed(&ctdb->last_recovery_finished) < (ctdb->tunable.rerecovery_timeout + 3)) {
|
||||
if (!fast_start && timeval_elapsed(&ctdb->last_recovery_finished) < (ctdb->tunable.rerecovery_timeout + 3)) {
|
||||
ctdb->db_persistent_startup_generation = INVALID_GENERATION;
|
||||
|
||||
DEBUG(DEBUG_NOTICE,(__location__ " wait for pending recoveries to end. Wait one more second.\n"));
|
||||
|
@ -64,6 +64,7 @@ static struct {
|
||||
};
|
||||
|
||||
int script_log_level;
|
||||
bool fast_start;
|
||||
|
||||
/*
|
||||
called by the transport layer when a packet comes in
|
||||
@ -144,6 +145,7 @@ int main(int argc, const char *argv[])
|
||||
&options.max_persistent_check_errors, 0,
|
||||
"max allowed persistent check errors (default 0)", NULL },
|
||||
{ "log-ringbuf-size", 0, POPT_ARG_INT, &log_ringbuf_size, DEBUG_ERR, "Number of log messages we can store in the memory ringbuffer", NULL },
|
||||
{ "sloppy-start", 0, POPT_ARG_NONE, &fast_start, 0, "Do not perform full recovery on start", NULL },
|
||||
POPT_TABLEEND
|
||||
};
|
||||
int opt, ret;
|
||||
|
Loading…
Reference in New Issue
Block a user