HBASE-12123 Failed assertion in BucketCache after 11331
This commit is contained in:
parent
b5783795cd
commit
7a064f96ba
|
@ -1235,11 +1235,13 @@ public class BucketCache implements BlockCache, HeapSize {
|
|||
bucketEntry.setDeserialiserReference(data.getDeserializer(), deserialiserMap);
|
||||
try {
|
||||
if (data instanceof HFileBlock) {
|
||||
ByteBuffer sliceBuf = ((HFileBlock) data).getBufferReadOnlyWithHeader();
|
||||
HFileBlock block = (HFileBlock) data;
|
||||
ByteBuffer sliceBuf = block.getBufferReadOnlyWithHeader();
|
||||
sliceBuf.rewind();
|
||||
assert len == sliceBuf.limit() + HFileBlock.EXTRA_SERIALIZATION_SPACE;
|
||||
assert len == sliceBuf.limit() + HFileBlock.EXTRA_SERIALIZATION_SPACE ||
|
||||
len == sliceBuf.limit() + block.headerSize() + HFileBlock.EXTRA_SERIALIZATION_SPACE;
|
||||
ByteBuffer extraInfoBuffer = ByteBuffer.allocate(HFileBlock.EXTRA_SERIALIZATION_SPACE);
|
||||
((HFileBlock) data).serializeExtraInfo(extraInfoBuffer);
|
||||
block.serializeExtraInfo(extraInfoBuffer);
|
||||
ioEngine.write(sliceBuf, offset);
|
||||
ioEngine.write(extraInfoBuffer, offset + len - HFileBlock.EXTRA_SERIALIZATION_SPACE);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue