elasticsearch/elasticsearch — pull request #7735 by dakrone (2014-09-16 09:44:35+00:00)
Title: Write translog opSize twice

Adds a new `greedyRead` method that will read the operation sizes, then
consume that many bytes in the stream, validating the checksum without
transforming the bytes into a `Translog.Operation`. If the bytes are not
corrupt they are read into an operation and returned.

This new `greedyRead` method is used when reading translogs from disk,
where they may have corrupted sizes that can cause OOMEs

Adds a new test with a translog with a corrupted opSize and removes the
`@AwaitsFix` from the testTranslogCorruption in
`AbstractSimpleTranslogTests`.