[
https://issues.apache.org/jira/browse/HBASE-25880?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ruanhui updated HBASE-25880:
----------------------------
Description:
When clear compaction queues, we just clear the workQueue of
ThreadPoolExecutor, but files in compaction request are still in
filesCompacting list. maybe we should clear it also.
For system compaction, selectNow will be false, which means files will be added
to the compacting list when the compaction task is actually executed. So it is
safe to just clear the workQueue of compaction thread pool executor.
However, for user-triggered compaction, selectNow will be true, which means
files are already added to the compacting list when we put the compaction
request to the queue. When CompactionPolicy selects candidate files for minor
compaction, files in compacting list will be excluded. If we just clear the
workQueue of compaction thread pool executor, files of these compaction
requests are still in compacting list. These files will not be selected by
CompactionPolicy and compacted any more unless we force a major compaction. So
I think maybe we should remove those files from compacting list when we clear
the compaction queue.
was:
When clear compaction queues, we just clear the workQueue of
ThreadPoolExecutor, but files in compaction request are still in
filesCompacting list. maybe we should clear it also.
here is my PR: https://github.com/apache/hbase/pull/3261
> remove files from filesCompacting when clear compaction queues
> --------------------------------------------------------------
>
> Key: HBASE-25880
> URL: https://issues.apache.org/jira/browse/HBASE-25880
> Project: HBase
> Issue Type: Bug
> Components: Compaction
> Reporter: ruanhui
> Assignee: ruanhui
> Priority: Minor
>
> When clear compaction queues, we just clear the workQueue of
> ThreadPoolExecutor, but files in compaction request are still in
> filesCompacting list. maybe we should clear it also.
> For system compaction, selectNow will be false, which means files will be
> added to the compacting list when the compaction task is actually executed.
> So it is safe to just clear the workQueue of compaction thread pool executor.
> However, for user-triggered compaction, selectNow will be true, which means
> files are already added to the compacting list when we put the compaction
> request to the queue. When CompactionPolicy selects candidate files for minor
> compaction, files in compacting list will be excluded. If we just clear the
> workQueue of compaction thread pool executor, files of these compaction
> requests are still in compacting list. These files will not be selected by
> CompactionPolicy and compacted any more unless we force a major compaction.
> So I think maybe we should remove those files from compacting list when we
> clear the compaction queue.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)