Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E89A16626 for ; Fri, 24 Jun 2011 16:20:10 +0000 (UTC) Received: (qmail 66598 invoked by uid 500); 24 Jun 2011 16:20:10 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 66566 invoked by uid 500); 24 Jun 2011 16:20:10 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 66558 invoked by uid 99); 24 Jun 2011 16:20:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Jun 2011 16:20:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Jun 2011 16:20:08 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id ADAF242D4B2 for ; Fri, 24 Jun 2011 16:19:47 +0000 (UTC) Date: Fri, 24 Jun 2011 16:19:47 +0000 (UTC) From: "Ted Yu (JIRA)" To: issues@hbase.apache.org Message-ID: <297240581.37079.1308932387708.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1811856847.34879.1308869448452.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (HBASE-4024) Major compaction may not be triggered, even though region server log says it is triggered MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HBASE-4024?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ted Yu updated HBASE-4024: -------------------------- Attachment: 4024.txt Added filesToCompact.size() check in isMajorCompaction() TestCompaction and TestCompactSelection pass. > Major compaction may not be triggered, even though region server log says it is triggered > ----------------------------------------------------------------------------------------- > > Key: HBASE-4024 > URL: https://issues.apache.org/jira/browse/HBASE-4024 > Project: HBase > Issue Type: Bug > Components: regionserver > Reporter: Suraj Varma > Assignee: Ted Yu > Priority: Trivial > Labels: newbie > Fix For: 0.92.0 > > Attachments: 4024.txt > > > The trunk version of regionserver/Store.java, method List compactSelection(List candidates) has this code to determine whether major compaction should be done or not: > // major compact on user action or age (caveat: we have too many files) > boolean majorcompaction = (forcemajor || isMajorCompaction(filesToCompact)) > && filesToCompact.size() < this.maxFilesToCompact; > The isMajorCompaction(filesToCompact) method internally determines whether or not major compaction is required (and logs this as "Major compaction triggered ... " log message. However, after the call, the compactSelection method subsequently applies the filesToCompact.size() < this.maxFilesToCompact check which can turn off major compaction. > This would result in a "Major compaction triggered" log message without actually triggering a major compaction. > The filesToCompact.size() check should probably be moved inside the isMajorCompaction(filesToCompact) method. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira