Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZOOKEEPER-4813: Make zookeeper start successfully when the last log file is dirty during the restore progress #2144

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,16 @@ public long getStorageSize() {
private boolean goToNextLog() throws IOException {
if (storedFiles.size() > 0) {
this.logFile = storedFiles.remove(storedFiles.size() - 1);
ia = createInputArchive(this.logFile);
try {
ia = createInputArchive(this.logFile);
} catch (EOFException e) {
if (storedFiles.isEmpty()) {
LOG.warn("The last log file {} EOF when create input archive, delete it.", logFile.getName(), e);
logFile.deleteOnExit();
return false;
}
throw e;
}
return true;
}
return false;
Expand Down