accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] keith-turner commented on a change in pull request #395: ACCUMULO-4835 Make TableOps throw TableNotFound
Date Tue, 06 Mar 2018 17:57:11 GMT
keith-turner commented on a change in pull request #395: ACCUMULO-4835 Make TableOps throw
TableNotFound
URL: https://github.com/apache/accumulo/pull/395#discussion_r172604831
 
 

 ##########
 File path: core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java
 ##########
 @@ -1069,14 +1069,17 @@ private void waitForTableStateTransition(String tableId, TableState
expectedStat
 
       if (Tables.getTableState(context.getInstance(), tableId) != expectedState) {
         Tables.clearCache(context.getInstance());
-        if (Tables.getTableState(context.getInstance(), tableId) != expectedState) {
+        TableState currentState = Tables.getTableState(context.getInstance(), tableId);
+        if (currentState != expectedState) {
           if (!Tables.exists(context.getInstance(), tableId))
             throw new TableDeletedException(tableId);
+          if (currentState == TableState.DELETING)
+            throw new TableNotFoundException(tableId, "", "Table is being deleted.");
           throw new AccumuloException("Unexpected table state " + tableId + " " + Tables.getTableState(context.getInstance(),
tableId) + " != " + expectedState);
         }
       }
 
-      Range range = new KeyExtent(new Text(tableId), null, null).toMetadataRange();
+      Range range;
 
 Review comment:
   Good catch

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message