You are viewing a plain text version of this content. The canonical link for it is here.
Posted to codereview@trafodion.apache.org by prashanth-vasudev <gi...@git.apache.org> on 2017/05/08 17:41:58 UTC

[GitHub] incubator-trafodion pull request #1075: This is a large contribution of chan...

Github user prashanth-vasudev commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/1075#discussion_r115299127
  
    --- Diff: core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/TransactionManager.java ---
    @@ -2659,19 +2758,37 @@ public void createTable(final TransactionState transactionState, HTableDescripto
                 else {
                   admin.createTable(desc);
                 }
    +            // make sure the table is enabled
    +            boolean keepPolling = true;
    +            TableName tableName = desc.getTableName();
    +            while (keepPolling) {
    +
    +               try {
    +                 Thread.sleep(1000); // sleep one second or until interrupted
    +               }
    +               catch (InterruptedException e) {
    +                  // ignore the interruption and keep going
    +               }
    +
    --- End diff --
    
    Generally table is enabled as part of admin coming back from a waited call. If not enabled by any chance,  may be it is better to sleep only if isTableEnabled() call comes back as disabled.  The concern is create table will now sleep for one second always.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---