Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.4.1
-
None
-
Reviewed
-
Patch
Description
The RegionInfo class uses
DataInputStream.read(byte[lengthOfPBMagic])
to read the protobuf magic marker from the beginning of the stream.
The code in RegionInfo assumes that the passed byte buffer will be filled, but the DataInputStream class only guarantees that it will read at most lengthOfPBMagic bytes.
This sometimes causes errors stating that region info file could not be parsed.
The fix is to simply issue multiple read calls until lengthOfPBMagic bytes have been read.
Attachments
Attachments
Issue Links
- is related to
-
HBASE-25859 Reference class incorrectly parses the protobuf magic marker
- Resolved
- links to