[
https://issues.apache.org/jira/browse/HBASE-20789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16524520#comment-16524520
]
Zheng Hu commented on HBASE-20789:
----------------------------------
Check it again, I would suggest that not depend on the comparison code which
is calculated by comparing the serialized ByteBuffer.. because if bigEndian or
not , the comparsion code will diff , it's a potential risk ..
{code}
//HeapByteBuffer#putInt
static void putInt(ByteBuffer bb, int bi, int x, boolean bigEndian) {
if (bigEndian)
putIntB(bb, bi, x);
else
putIntL(bb, bi, x);
}
{code}
In BlockCacheUtil#validateBlockAddition, I think we can just compare the block
without nextBlockMetadata first, if not equal, throw the RE, otherwise, just
compare the nextBlockOnDiskSize ... the trouble is , it's not easy to access
the nextBlockOnDiskSize member in the abstract Cacheable interface ...
I think we can just define a new method in Cacheable .
> TestBucketCache#testCacheBlockNextBlockMetadataMissing is flaky
> ---------------------------------------------------------------
>
> Key: HBASE-20789
> URL: https://issues.apache.org/jira/browse/HBASE-20789
> Project: HBase
> Issue Type: Bug
> Reporter: Zheng Hu
> Assignee: Zheng Hu
> Priority: Major
> Attachments: bucket-33718.out
>
>
> The UT failed frequently in our internal branch-2... Will dig into the UT.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)