Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 590B5200C26 for ; Fri, 10 Feb 2017 22:54:48 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 57A2A160B4E; Fri, 10 Feb 2017 21:54:48 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id AA654160B5C for ; Fri, 10 Feb 2017 22:54:47 +0100 (CET) Received: (qmail 19948 invoked by uid 500); 10 Feb 2017 21:54:46 -0000 Mailing-List: contact dev-help@tephra.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tephra.incubator.apache.org Delivered-To: mailing list dev@tephra.incubator.apache.org Received: (qmail 19593 invoked by uid 99); 10 Feb 2017 21:54:46 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Feb 2017 21:54:46 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 35C96180B10 for ; Fri, 10 Feb 2017 21:54:46 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.199 X-Spam-Level: X-Spam-Status: No, score=-1.199 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id gY8KlV7_nDJ8 for ; Fri, 10 Feb 2017 21:54:45 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 0AA365F647 for ; Fri, 10 Feb 2017 21:54:45 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id BAD82E061C for ; Fri, 10 Feb 2017 21:54:42 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id CCADE21D70 for ; Fri, 10 Feb 2017 21:54:41 +0000 (UTC) Date: Fri, 10 Feb 2017 21:54:41 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@tephra.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (TEPHRA-216) Invalid Transaction List Pruning will not proceed if there are empty transactional tables MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 10 Feb 2017 21:54:48 -0000 [ https://issues.apache.org/jira/browse/TEPHRA-216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15861890#comment-15861890 ] ASF GitHub Bot commented on TEPHRA-216: --------------------------------------- Github user gokulavasan commented on a diff in the pull request: https://github.com/apache/incubator-tephra/pull/34#discussion_r100632110 --- Diff: tephra-hbase-compat-1.1-base/src/main/java/org/apache/tephra/hbase/txprune/HBaseTransactionPruningPlugin.java --- @@ -322,6 +333,28 @@ private long computePruneUpperBound(TimeRegions timeRegions) throws IOException return -1; } + private Map handleEmptyRegions(long inactiveTransactionBound, + SortedSet transactionalRegions, + Map pruneUpperBoundRegions) throws IOException { + long inactiveTransactionBoundTime = TxUtils.getTimestamp(inactiveTransactionBound); + SortedSet emptyRegions = + dataJanitorState.getEmptyRegionsAfterTime(inactiveTransactionBoundTime, transactionalRegions); + LOG.debug("Got empty transactional regions for inactive transaction bound time {}: {}", + inactiveTransactionBoundTime, Iterables.transform(emptyRegions, TimeRegions.BYTE_ARR_TO_STRING_FN)); + + // The regions that are recorded as empty after inactiveTransactionBoundTime will not have invalid data + // for transactions started before or on inactiveTransactionBoundTime. Hence we can consider the prune upper bound + // for these empty regions as inactiveTransactionBound + Map pubWithEmptyRegions = new TreeMap<>(Bytes.BYTES_COMPARATOR); + pubWithEmptyRegions.putAll(pruneUpperBoundRegions); + for (byte[] emptyRegion : emptyRegions) { + if (!pruneUpperBoundRegions.containsKey(emptyRegion)) { --- End diff -- Shouldn't this condition be reversed? If the region is empty, set the upper bound for it to be ``inactiveTransactionBound`` . > Invalid Transaction List Pruning will not proceed if there are empty transactional tables > ----------------------------------------------------------------------------------------- > > Key: TEPHRA-216 > URL: https://issues.apache.org/jira/browse/TEPHRA-216 > Project: Tephra > Issue Type: Sub-task > Affects Versions: 0.11.0-incubating > Reporter: Gokul Gunasekaran > Assignee: Poorna Chandra > > Since empty table/regions might not undergo major compaction, the prune upper bound of these regions will never have a value and thus will limit the progress of invalid list transaction pruning. -- This message was sent by Atlassian JIRA (v6.3.15#6346)