mymeiyi commented on a change in pull request #3318:
URL: https://github.com/apache/hbase/pull/3318#discussion_r644458410
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/Compactor.java
##########
@@ -451,25 +451,26 @@ protected boolean performCompaction(FileDetails fd,
InternalScanner scanner, Cel
progress.cancel();
return false;
}
- if (kvs != null && bytesWrittenProgressForShippedCall >
shippedCallSizeLimit) {
- if (lastCleanCell != null) {
- // HBASE-16931, set back sequence id to avoid affecting scan
order unexpectedly.
- // ShipperListener will do a clone of the last cells it refer,
so need to set back
- // sequence id before ShipperListener.beforeShipped
- PrivateCellUtil.setSequenceId(lastCleanCell, lastCleanCellSeqId);
- }
- // Clone the cells that are in the writer so that they are freed
of references,
- // if they are holding any.
- ((ShipperListener) writer).beforeShipped();
- // The SHARED block references, being read for compaction, will be
kept in prevBlocks
- // list(See HFileScannerImpl#prevBlocks). In case of scan flow,
after each set of cells
- // being returned to client, we will call shipped() which can
clear this list. Here by
- // we are doing the similar thing. In between the compaction
(after every N cells
- // written with collective size of 'shippedCallSizeLimit') we will
call shipped which
- // may clear prevBlocks list.
- kvs.shipped();
- bytesWrittenProgressForShippedCall = 0;
+ }
+ if (kvs != null && bytesWrittenProgressForShippedCall >
shippedCallSizeLimit) {
+ if (lastCleanCell != null) {
+ // HBASE-16931, set back sequence id to avoid affecting scan order
unexpectedly.
+ // ShipperListener will do a clone of the last cells it refer, so
need to set back
+ // sequence id before ShipperListener.beforeShipped
+ PrivateCellUtil.setSequenceId(lastCleanCell, lastCleanCellSeqId);
+ lastCleanCell = null;
Review comment:
Do you mean
`
for (Cell c : cells) {
writer.append(c);
if (kvs != null && bytesWrittenProgressForShippedCall >
shippedCallSizeLimit) {
if (lastCleanCell != null) {
PrivateCellUtil.setSequenceId(lastCleanCell,
lastCleanCellSeqId);
lastCleanCell = null;
}
((ShipperListener) writer).beforeShipped();
kvs.shipped();
}
}
`?
I do not think this can fix this issus.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]