milleruntime commented on a change in pull request #395: ACCUMULO-4835 Make
TableOps throw TableNotFound
URL: https://github.com/apache/accumulo/pull/395#discussion_r172602504
##########
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:
I also noticed this redundant assignment and removed it.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services