elasticsearch/elasticsearch — pull request #7780 by dakrone (2014-09-18 10:40:55+00:00)
Title: 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.