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/05/13 09:54:30 UTC

[GitHub] [hbase] frostruan commented on a change in pull request #3261: HBASE-25880 remove files from filesCompacting when clear compaction queue

frostruan commented on a change in pull request #3261:
URL: https://github.com/apache/hbase/pull/3261#discussion_r631697628



##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
##########
@@ -1953,6 +1953,22 @@ private void addToCompactingFiles(Collection<HStoreFile> filesToAdd) {
     Collections.sort(filesCompacting, storeEngine.getStoreFileManager().getStoreFileComparator());
   }
 
+  /**
+   * Remove the files from compacting files. This usually happens when we clear compaction queues.
+   */
+  public void removeFromCompactingFiles(Collection<HStoreFile> filesToRemove) {
+    synchronized (filesCompacting) {
+      filesCompacting.removeAll(filesToRemove);
+      Collections.sort(filesCompacting, storeEngine.getStoreFileManager().getStoreFileComparator());
+    }
+  }
+
+  public List<HStoreFile> getFilesCompacting() {

Review comment:
       yes. Thanks for your advise. I will fix it.




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