From notifications-return-42458-archive-asf-public=cust-asf.ponee.io@accumulo.apache.org Tue Mar 6 19:00:11 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 00CF1180652 for ; Tue, 6 Mar 2018 19:00:10 +0100 (CET) Received: (qmail 90704 invoked by uid 500); 6 Mar 2018 18:00:10 -0000 Mailing-List: contact notifications-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jira@apache.org Delivered-To: mailing list notifications@accumulo.apache.org Received: (qmail 90693 invoked by uid 99); 6 Mar 2018 18:00:10 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Mar 2018 18:00:10 +0000 From: GitBox To: notifications@accumulo.apache.org Subject: [GitHub] milleruntime closed pull request #395: ACCUMULO-4835 Make TableOps throw TableNotFound Message-ID: <152035920934.20916.17043409562556530422.gitbox@gitbox.apache.org> Date: Tue, 06 Mar 2018 18:00:09 -0000 milleruntime closed pull request #395: ACCUMULO-4835 Make TableOps throw TableNotFound URL: https://github.com/apache/accumulo/pull/395 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java b/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java index 3015b1dd73..d976c4d93e 100644 --- a/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java +++ b/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; if (startRow == null || lastRow == null) range = new KeyExtent(new Text(tableId), null, null).toMetadataRange(); else ---------------------------------------------------------------- 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