From 8ac1902a651175ff869940bcc6f1e068527c84c2 Mon Sep 17 00:00:00 2001 From: Rich Prohaska Date: Tue, 16 Apr 2013 23:59:02 -0400 Subject: [PATCH] recovery checks for logcursor errors refs[t:2443] git-svn-id: file:///svn/toku/tokudb@18343 c7de825b-a66e-492c-adef-691d508d4ae1 --- newbrt/recover.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/newbrt/recover.c b/newbrt/recover.c index 7ae9e1cca4f..94a854605c6 100644 --- a/newbrt/recover.c +++ b/newbrt/recover.c @@ -1174,10 +1174,10 @@ static int do_recovery(RECOVER_ENV renv, const char *env_dir, const char *log_di if (tokudb_recovery_trace) recover_trace_le(__FUNCTION__, __LINE__, r, le); if (r != 0) { - if (r == DB_RUNRECOVERY) { - rr = DB_RUNRECOVERY; goto errorexit; - } - break; + if (r == DB_NOTFOUND) + break; + rr = DB_RUNRECOVERY; + goto errorexit; } // trace progress @@ -1238,7 +1238,8 @@ static int do_recovery(RECOVER_ENV renv, const char *env_dir, const char *log_di if (r != 0) { if (tokudb_recovery_trace) fprintf(stderr, "DB_RUNRECOVERY: %s:%d r=%d\n", __FUNCTION__, __LINE__, r); - rr = DB_RUNRECOVERY; goto errorexit; + rr = DB_RUNRECOVERY; + goto errorexit; } // get the next log entry @@ -1247,10 +1248,10 @@ static int do_recovery(RECOVER_ENV renv, const char *env_dir, const char *log_di if (tokudb_recovery_trace) recover_trace_le(__FUNCTION__, __LINE__, r, le); if (r != 0) { - if (r == DB_RUNRECOVERY) { - rr = DB_RUNRECOVERY; goto errorexit; - } - break; + if (r == DB_NOTFOUND) + break; + rr = DB_RUNRECOVERY; + goto errorexit; } }