mymeiyi commented on a change in pull request #3318:
URL: https://github.com/apache/hbase/pull/3318#discussion_r640336830



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/Compactor.java
##########
@@ -451,25 +451,25 @@ 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;
+        }

Review comment:
       Move this out of "for loop", because the "kvs.shipped()" will release 
the pre blocks in HFileReader, but some cells may have not been shipped by 
'writer.append(c)' in line 441. 




-- 
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]


Reply via email to