-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Remove even more boolean success flags #15134
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
base: main
Are you sure you want to change the base?
Conversation
} else { | ||
IOUtils.deleteFilesIgnoringExceptions(tempDir, sortedFile); | ||
} | ||
tempDir.deleteFile(sortedFile); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exceptions thrown by this should be handled by the method calling this close()
method
if (success) { | ||
IOUtils.close(reader, dir); | ||
} else { | ||
IOUtils.closeWhileHandlingException(reader, writer, dir); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new code implicitly calls close()
on writer
after rollback()
has been called, but IndexWriter
can handle that
This one is more complicated than the others. Especially the first file is hard. Why was it possible to remove success without any other code change? |
You mean That loop only exits normally once it gets to the end (returns |
This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the [email protected] list. Thank you for your contribution! |
Most of the remaining ones are in backwards-compatible codecs and the test framework