[ 
https://issues.apache.org/jira/browse/HBASE-28272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Longping Jie updated HBASE-28272:
---------------------------------
    Description: 
In the HStore.java class, in the requestCompaction method, after manually 
triggering Major Compaction, this.forceMajor is set to true.

When clearing the force flag, execute the following code:
{code:java}
this.forceMajor = this.forceMajor && !request.isMajor(); {code}
However, when the table is a Stripe Compaction strategy (other compaction 
policy may have similar problems), request.isMajor() is always false because, 
in CompactionRequestImpl
The setIsMajor method is not always called. We need to check the calling status 
of the setIsMajor method. Otherwise, after a major is manually triggered, 
forceMajor will always be true, and subsequent periodic major compactions will 
also be forced to compaction.

  was:
In the HStore.java class, in the requestCompaction method, after manually 
triggering Major Compaction, this.forceMajor is set to true.

When clearing the force flag, execute the following code:
{code:java}
// code placeholder
{code}
this.forceMajor = this.forceMajor && !request.isMajor();


However, when the table is a Stripe Compaction strategy (other compaction 
policy may have similar problems), request.isMajor() is always false because, 
in CompactionRequestImpl
The setIsMajor method is not always called. We need to check the calling status 
of the setIsMajor method. Otherwise, after a major is manually triggered, 
forceMajor will always be true, and subsequent periodic major compactions will 
also be forced to compaction.


> After triggering a Major Compaction, clearing the force flag has no effect.
> ---------------------------------------------------------------------------
>
>                 Key: HBASE-28272
>                 URL: https://issues.apache.org/jira/browse/HBASE-28272
>             Project: HBase
>          Issue Type: Bug
>          Components: Compaction
>    Affects Versions: 2.2.6
>            Reporter: Longping Jie
>            Priority: Major
>
> In the HStore.java class, in the requestCompaction method, after manually 
> triggering Major Compaction, this.forceMajor is set to true.
> When clearing the force flag, execute the following code:
> {code:java}
> this.forceMajor = this.forceMajor && !request.isMajor(); {code}
> However, when the table is a Stripe Compaction strategy (other compaction 
> policy may have similar problems), request.isMajor() is always false because, 
> in CompactionRequestImpl
> The setIsMajor method is not always called. We need to check the calling 
> status of the setIsMajor method. Otherwise, after a major is manually 
> triggered, forceMajor will always be true, and subsequent periodic major 
> compactions will also be forced to compaction.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to