-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
HBASE-26780 HFileBlock.verifyOnDiskSizeMatchesHeader throw IOException: Passed in onDiskSizeWithHeader= A != 33 #5352
base: master
Are you sure you want to change the base?
Conversation
…n: Passed in onDiskSizeWithHeader= A != 33
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
The failed UT is unrelated to the change |
if ( | ||
headerBuf == null | ||
|| headerBuf.getInt(Header.ON_DISK_SIZE_WITHOUT_HEADER_INDEX) != onDiskSizeWithHeader | ||
) { |
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 braces's style is not right?
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 style is modified by spotless automatically after I ran spotless:apply
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
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.
How have you tested this? Could we write a unit test which demonstrates the intended behavior?
int preReadHeaderSize = 0; | ||
if ( | ||
headerBuf == null | ||
|| headerBuf.getInt(Header.ON_DISK_SIZE_WITHOUT_HEADER_INDEX) != onDiskSizeWithHeader |
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 value read from onDiskSizeWithoutHeader
should never equal onDiskSizeWithHeader
, right?
1: onDiskSizeWithoutHeader: Compressed -- a.k.a 'on disk' -- block size, excluding header, but including tailing checksum bytes (4 bytes)
While onDiskSizeWithHeader
should be the entire serialized block: header + serialized data + checksums.
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.
Yes, here is an error, has changed to getOnDiskSizeWithHeader.
|
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
https://issues.apache.org/jira/browse/HBASE-26780