tephra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TEPHRA-216) Invalid Transaction List Pruning will not proceed if there are empty transactional tables
Date Sat, 11 Feb 2017 00:03:43 GMT

    [ https://issues.apache.org/jira/browse/TEPHRA-216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15862042#comment-15862042
] 

ASF GitHub Bot commented on TEPHRA-216:
---------------------------------------

Github user poornachandra commented on a diff in the pull request:

    https://github.com/apache/incubator-tephra/pull/34#discussion_r100648648
  
    --- 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<byte[], Long> handleEmptyRegions(long inactiveTransactionBound,
    +                                               SortedSet<byte[]> transactionalRegions,
    +                                               Map<byte[], Long> pruneUpperBoundRegions)
throws IOException {
    +    long inactiveTransactionBoundTime = TxUtils.getTimestamp(inactiveTransactionBound);
    +    SortedSet<byte[]> 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<byte[], Long> pubWithEmptyRegions = new TreeMap<>(Bytes.BYTES_COMPARATOR);
    +    pubWithEmptyRegions.putAll(pruneUpperBoundRegions);
    +    for (byte[] emptyRegion : emptyRegions) {
    +      if (!pruneUpperBoundRegions.containsKey(emptyRegion)) {
    +        pubWithEmptyRegions.put(emptyRegion, inactiveTransactionBound);
    --- End diff --
    
    If an empty region does not contain a prune upper bound value then we put `inactiveTransactionBound`
as its prune upper bound. How do you suggest this be changed?


> 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)

Mime
View raw message