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

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_r98803604
  
    --- Diff: 
tephra-hbase-compat-1.1-base/src/main/java/org/apache/tephra/hbase/txprune/HBaseTransactionPruningPlugin.java
 ---
    @@ -219,13 +219,20 @@ public void destroy() {
        */
       protected void createPruneTable(TableName stateTable) throws IOException 
{
         try (Admin admin = this.connection.getAdmin()) {
    +      if (admin.tableExists(stateTable)) {
    +        LOG.debug("Not creating pruneStateTable {} since it already 
exists.",
    +                  stateTable.getNameWithNamespaceInclAsString());
    +        return;
    +      }
    +
           HTableDescriptor htd = new HTableDescriptor(stateTable);
           htd.addFamily(new 
HColumnDescriptor(DataJanitorState.FAMILY).setMaxVersions(1));
           admin.createTable(htd);
           LOG.info("Created pruneTable {}", 
stateTable.getNameWithNamespaceInclAsString());
         } catch (TableExistsException ex) {
    -      // Expected if the prune state table already exists
    -      LOG.debug("Not creating pruneStateTable since it already exists. 
{}", ex.getMessage());
    +      // Expected if the prune state table is being created at the same 
time by another client
    +      LOG.debug("Not creating pruneStateTable {} since it already exists. 
{}",
    +                stateTable.getNameWithNamespaceInclAsString(), 
ex.getMessage());
    --- End diff --
    
    Log the throwable


> 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.15#6346)

Reply via email to