Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
keith-turner committed Sep 7, 2024
1 parent 433b14b commit 7d13393
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,8 @@ public boolean needsRecovery(TabletMetadata tabletMetadata){
}

try {
// TODO cache finished marker
// TODO cache finished marker.. or maybe cache the child dirs
// TODO the code inside logger seems to be looking for the finish marker also
List<Path> recoveryDirs = new ArrayList<>();
for (LogEntry entry : logEntries) {
Path recovery = null;
Expand All @@ -1109,7 +1110,11 @@ public boolean needsRecovery(TabletMetadata tabletMetadata){
recoveryDirs.add(recovery);
}

return logger.needsRecovery(getContext(), tabletMetadata.getExtent(), recoveryDirs, resourceManager.getFileLenCache(), new BasicCacheProvider(resourceManager.getIndexCache(), resourceManager.getDataCache()));
boolean needsRecovery = logger.needsRecovery(getContext(), tabletMetadata.getExtent(), recoveryDirs, resourceManager.getFileLenCache(), new BasicCacheProvider(resourceManager.getIndexCache(), resourceManager.getDataCache()));
if(!needsRecovery) {
// TODO this may be redundant , look at the over logs
log.debug("tablet {} has walogs but does not have any data in them", tabletMetadata.getExtent());
}
}catch (IOException e){
throw new UncheckedIOException(e);
}
Expand Down

0 comments on commit 7d13393

Please sign in to comment.