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



##########
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:
       What I am saying is this set to null is enough to solve the problem you 
saw.
   You do not have to move the block outside of for loop. So  this single line 
change will fix it.  You have a repro. Will u be able to confirm pls?   We can 
avoid larger change/




-- 
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:
us...@infra.apache.org


Reply via email to