You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/09/01 13:29:39 UTC

[GitHub] [hbase] yuqi1129 commented on a change in pull request #2337: HBASE-24973 Remove read point parameter in StoreFlush#performFlush

yuqi1129 commented on a change in pull request #2337:
URL: https://github.com/apache/hbase/pull/2337#discussion_r481137715



##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFlusher.java
##########
@@ -73,20 +73,20 @@ protected void finalizeWriter(StoreFileWriter writer, long cacheFlushSeqNum,
   /**
    * Creates the scanner for flushing snapshot. Also calls coprocessors.
    * @param snapshotScanners
-   * @param smallestReadPoint
    * @return The scanner; null if coprocessor is canceling the flush.
    */
   protected final InternalScanner createScanner(List<KeyValueScanner> snapshotScanners,
-      long smallestReadPoint, FlushLifeCycleTracker tracker) throws IOException {
+    FlushLifeCycleTracker tracker) throws IOException {
     ScanInfo scanInfo;
     if (store.getCoprocessorHost() != null) {
       scanInfo = store.getCoprocessorHost().preFlushScannerOpen(store, tracker);
     } else {
       scanInfo = store.getScanInfo();
     }
+    final long smallestReadPoint = store.getSmallestReadPoint();
     InternalScanner scanner = new StoreScanner(store, scanInfo, snapshotScanners,
         ScanType.COMPACT_RETAIN_DELETES, smallestReadPoint, HConstants.OLDEST_TIMESTAMP);
-    assert scanner != null;

Review comment:
       As far as I can see, scanner can't be null here as it's a local variance, see below
   ```
   scanner = new StoreScanner(store, scanInfo, snapshotScanners,
           ScanType.COMPACT_RETAIN_DELETES, smallestReadPoint, HConstants.OLDEST_TIMESTAMP);
   ```
   so i remove the assert logic here 




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