You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "yuqi (Jira)" <ji...@apache.org> on 2020/09/13 11:38:00 UTC

[jira] [Updated] (HBASE-25020) Fix major compaction interval check logic bug when value of `hbase.hregion.majorcompaction` is below 0

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

yuqi updated HBASE-25020:
-------------------------
    Description: 
In `RatioBasedCompactionPolicy#shouldPerformMajorCompaction`



{code:java}
// mcTime can be less than 0
long mcTime = getNextMajorCompactTime(filesToCompact);

//this check logic can't handle the condtion that mcTime is less than 0
    if (filesToCompact == null || filesToCompact.isEmpty() || mcTime == 0) {
      return result;
    }
  ....

  // As long as lowTimestamp > 0, the following logic is true, and major compaction will run continually
  if (lowTimestamp > 0L && lowTimestamp < (now - mcTime))

{code}


  was:
In `RatioBasedCompactionPolicy#shouldPerformMajorCompaction`



{code:java}
// mcTime can be less than 0
long mcTime = getNextMajorCompactTime(filesToCompact);

//this check logic can't handle the condtion that mcTime is less than 0
    if (filesToCompact == null || filesToCompact.isEmpty() || mcTime == 0) {
      return result;
    }
  ....

  // As long as lowTimestamp > 0, the following logic is true
  if (lowTimestamp > 0L && lowTimestamp < (now - mcTime))

{code}



> Fix major compaction interval check logic bug when value of `hbase.hregion.majorcompaction` is below 0
> ------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-25020
>                 URL: https://issues.apache.org/jira/browse/HBASE-25020
>             Project: HBase
>          Issue Type: Bug
>            Reporter: yuqi
>            Assignee: yuqi
>            Priority: Minor
>
> In `RatioBasedCompactionPolicy#shouldPerformMajorCompaction`
> {code:java}
> // mcTime can be less than 0
> long mcTime = getNextMajorCompactTime(filesToCompact);
> //this check logic can't handle the condtion that mcTime is less than 0
>     if (filesToCompact == null || filesToCompact.isEmpty() || mcTime == 0) {
>       return result;
>     }
>   ....
>   // As long as lowTimestamp > 0, the following logic is true, and major compaction will run continually
>   if (lowTimestamp > 0L && lowTimestamp < (now - mcTime))
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)