ubik: Log a message when we replay the trans log
authorAndrew Deason <adeason@sinenomine.net>
Wed, 24 Nov 2010 15:03:19 +0000 (10:03 -0500)
committerDerrick Brashear <shadow@dementia.org>
Thu, 25 Nov 2010 03:42:26 +0000 (19:42 -0800)
It can be helpful to know that an interrupted transaction was replayed
on startup, and this should be rare. So log a message when that
happens, indicating what db version we replayed to.

Change-Id: I8b2562dea2811190d1a45ba47f362a2441f39dfa
Reviewed-on: http://gerrit.openafs.org/3385
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

src/ubik/recovery.c

index 89f3843..e47beb5 100644 (file)
@@ -289,6 +289,9 @@ ReplayLog(struct ubik_dbase *adbase)
                code = (*adbase->setlabel) (adbase, 0, &version);
                if (code)
                    return code;
+               ubik_print("Successfully replayed log for interrupted "
+                          "transaction; db version is now %ld.%ld\n",
+                          (long) version.epoch, (long) version.counter);
                logIsGood = 1;
                break;          /* all done now */
            } else if (opcode == LOGTRUNCATE) {