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 2021/11/23 04:40:12 UTC

[GitHub] [hbase] anoopsjohn commented on a change in pull request #3859: HBASE-26465 MemStoreLAB may be released early when its SegmentScanner…

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



##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
##########
@@ -1222,6 +1225,14 @@ private boolean updateStorefiles(List<HStoreFile> sfs, long snapshotId) throws I
     this.lock.writeLock().lock();
     try {
       this.storeEngine.getStoreFileManager().insertNewFiles(sfs);
+      /**
+       * NOTE:we should keep clearSnapshot method inside the write lock because clearSnapshot may
+       * close {@link DefaultMemStore#snapshot}, which may be used by
+       * {@link DefaultMemStore#getScanners}.
+       */
+      if (snapshotId > 0) {

Review comment:
       So this is the actual fix part. Moving the clearSnapshot back under the writelock. Correct?




-- 
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: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org