light: allow logfiles not to be consecutive on secondary site

If there are holes in the logfile sequence and this holes concern only logfiles
which are already applied (i.e. logfiles lying before all replay links)
the secondary can continue working.
Warnings are written as long as the situation exists.

Signed-off-by: Thomas Schoebel-Theuer <tst@1und1.de>
This commit is contained in:
Frank Liepold 2013-10-18 08:03:43 +02:00 committed by Thomas Schoebel-Theuer
parent 675e46d689
commit c832799910
1 changed files with 0 additions and 5 deletions

View File

@ -2403,11 +2403,6 @@ int make_log_step(void *buf, struct mars_dent *dent)
prev_log = rot->next_log; prev_log = rot->next_log;
if (prev_log && prev_log->d_serial + 1 != dent->d_serial) { if (prev_log && prev_log->d_serial + 1 != dent->d_serial) {
MARS_WRN_TO(rot->log_say, "transaction logs are not consecutive at '%s' (%d ~> %d)\n", dent->d_path, prev_log->d_serial, dent->d_serial); MARS_WRN_TO(rot->log_say, "transaction logs are not consecutive at '%s' (%d ~> %d)\n", dent->d_path, prev_log->d_serial, dent->d_serial);
// allow the primary to create a hole in the logfile sequence numbers
if (!rot->todo_primary || prev_log->d_serial + 2 != dent->d_serial) {
status = -EINVAL;
goto done;
}
} }
if (dent->d_serial > rot->max_sequence) { if (dent->d_serial > rot->max_sequence) {