Apache9 commented on code in PR #4882:
URL: https://github.com/apache/hbase/pull/4882#discussion_r1023461418


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java:
##########
@@ -961,10 +961,10 @@ public List<KeyValueScanner> getScanners(boolean 
cacheBlocks, boolean usePread,
       storeFilesToScan = 
this.storeEngine.getStoreFileManager().getFilesForScan(startRow,
         includeStartRow, stopRow, includeStopRow);
       memStoreScanners = this.memstore.getScanners(readPt);
+      storeFilesToScan.stream().forEach(f->f.getReader().incrementRefCount());

Review Comment:
   OK, we will release the lock immediately after getting the file list, so 
when we actually get the store file scanner, the file may have already been 
archived.
   
   I think a simple fix is to just move the getting scanner code into the read 
lock section? As here you only increase the lock if the reader is not null, it 
is still possible that some files are archived later?



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to