From issues-return-6614-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Mon May 6 22:36:23 2019 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 [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 6721C18060F for ; Tue, 7 May 2019 00:36:23 +0200 (CEST) Received: (qmail 92527 invoked by uid 500); 6 May 2019 22:36:22 -0000 Mailing-List: contact issues-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.apache.org Delivered-To: mailing list issues@phoenix.apache.org Received: (qmail 92514 invoked by uid 99); 6 May 2019 22:36:22 -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; Mon, 06 May 2019 22:36:22 +0000 From: GitBox To: issues@phoenix.apache.org Subject: [GitHub] [phoenix] gjacoby126 commented on a change in pull request #499: Phoenix 4703 ALTER INDEX REBUILD ALL Message-ID: <155718218271.7137.17397797623187760398.gitbox@gitbox.apache.org> Date: Mon, 06 May 2019 22:36:22 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit gjacoby126 commented on a change in pull request #499: Phoenix 4703 ALTER INDEX REBUILD ALL URL: https://github.com/apache/phoenix/pull/499#discussion_r281392024 ########## File path: phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java ########## @@ -4362,18 +4370,40 @@ public MutationState alterIndex(AlterIndexStatement statement) throws SQLExcepti // Set so that we get the table below with the potentially modified rowKeyOrderOptimizable flag set indexRef.setTable(result.getTable()); if (newIndexState == PIndexState.BUILDING && isAsync) { - try { - tableUpsert = connection.prepareStatement(UPDATE_INDEX_REBUILD_ASYNC_STATE); - tableUpsert.setString(1, - connection.getTenantId() == null ? null : connection.getTenantId().getString()); - tableUpsert.setString(2, schemaName); - tableUpsert.setString(3, indexName); - tableUpsert.setLong(4, result.getTable().getTimeStamp()); - tableUpsert.execute(); - connection.commit(); - } finally { - if (tableUpsert != null) { - tableUpsert.close(); + if (isAll) { + List tasks = Task.queryTaskTable(connection, schemaName, tableName, PTable.TaskType.INDEX_REBUILD, Review comment: @vincentpoon, @mihir6692 , @twdsilva , we're trying to move manually triggered index rebuilds (ALTER INDEX REBUILD) to use System.Tasks rather than the index disable timestamp + PhoenixMRJobSubmitter. Is anything else you know of depending on the syscat index timestamp being set when doing a manual rebuild? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to 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