Skip to content

Commit

Permalink
Fix recovery issue in the code finding the latest check point
Browse files Browse the repository at this point in the history
In the case there are only log files with versions greater than zero
and no checkpoints in any of those, we mistakenly report that no
recovery is needed.
  • Loading branch information
davidegrohmann committed Nov 22, 2016
1 parent 28fdd06 commit ad30989
Show file tree
Hide file tree
Showing 2 changed files with 132 additions and 90 deletions.
Expand Up @@ -62,7 +62,7 @@ public LatestCheckPoint find( long fromVersionBackwards ) throws IOException
LogVersionedStoreChannel channel = PhysicalLogFile.tryOpenForVersion( logFiles, fileSystem, version ); LogVersionedStoreChannel channel = PhysicalLogFile.tryOpenForVersion( logFiles, fileSystem, version );
if ( channel == null ) if ( channel == null )
{ {
return new LatestCheckPoint( null, false, oldestVersionFound ); break;
} }


oldestVersionFound = version; oldestVersionFound = version;
Expand Down

0 comments on commit ad30989

Please sign in to comment.