Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor the Translog.read(Location) method
It was only used by `readSource`, it has been changed to return a Translog.Operation, which can have .getSource() called on it to return the source. `readSource` has been removed. This also removes the checked IOException, any exception thrown is unexpected and should throw a runtime exception. Moves the ReleasableBytesStreamOutput allocation into the body of the try-catch block so the lock can be released in the event of an exception during allocation.
- Loading branch information
Showing
4 changed files
with
33 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters