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-212) CompactionState #savePruneUpperBoundForRegion put call might because problems if regions are not available
Date Fri, 27 Jan 2017 02:23:24 GMT

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

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

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

    https://github.com/apache/incubator-tephra/pull/29#discussion_r98135416
  
    --- Diff: tephra-hbase-compat-1.1-base/src/main/java/org/apache/tephra/hbase/txprune/CompactionState.java
---
    @@ -75,18 +76,34 @@ public void record(CompactionRequest request, @Nullable TransactionVisibilitySta
       }
     
       /**
    +   * Stops the current {@link PruneUpperBoundWriter}.
    +   */
    +  public void stop() {
    +    if (pruneUpperBoundWriter != null) {
    +      pruneUpperBoundWriter.stop();
    +    }
    +  }
    +
    +  /**
        * Persists the transaction state recorded by {@link #record(CompactionRequest, TransactionVisibilityState)}.
        * This method is called after the compaction has successfully completed.
        */
       public void persist() {
         if (pruneUpperBound != -1) {
    -      try {
    -        dataJanitorState.savePruneUpperBoundForRegion(regionName, pruneUpperBound);
    -        LOG.debug(String.format("Saved prune upper bound %s for region %s", pruneUpperBound,
regionNameAsString));
    -      } catch (IOException e) {
    -        LOG.warn(String.format("Cannot record prune upper bound in table %s after compacting
region %s",
    -                               stateTable, regionNameAsString), e);
    -      }
    +      PruneUpperBoundWriter upperBoundWriter = getPruneUpperBoundWriter();
    --- End diff --
    
    There are redundant instances of class `PruneUpperBoundWriter` => `upperBoundWriter`
and a`pruneUpperBoundWriter`


> CompactionState #savePruneUpperBoundForRegion put call might because problems if regions
are not available
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: TEPHRA-212
>                 URL: https://issues.apache.org/jira/browse/TEPHRA-212
>             Project: Tephra
>          Issue Type: Bug
>    Affects Versions: 0.11.0-incubating
>            Reporter: Gokul Gunasekaran
>            Assignee: Gokul Gunasekaran
>             Fix For: 0.11.0-incubating
>
>
> If the regions corresponding to prune state table are not available, trying to do a put
to that table might cause multiple retries etc and might cause issues. Instead of doing this
write in a synchronous fashion, this should be done asynchronously.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message