From reviews-return-27164-archive-asf-public=cust-asf.ponee.io@iotdb.apache.org Tue Jul 20 03:26:22 2021 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mxout1-ec2-va.apache.org (mxout1-ec2-va.apache.org [3.227.148.255]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id 57396180663 for ; Tue, 20 Jul 2021 05:26:22 +0200 (CEST) Received: from mail.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mxout1-ec2-va.apache.org (ASF Mail Server at mxout1-ec2-va.apache.org) with SMTP id 927663EAFC for ; Tue, 20 Jul 2021 03:26:21 +0000 (UTC) Received: (qmail 43212 invoked by uid 500); 20 Jul 2021 03:26:21 -0000 Mailing-List: contact reviews-help@iotdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@iotdb.apache.org Delivered-To: mailing list reviews@iotdb.apache.org Received: (qmail 43200 invoked by uid 99); 20 Jul 2021 03:26:21 -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, 20 Jul 2021 03:26:21 +0000 From: =?utf-8?q?GitBox?= To: reviews@iotdb.apache.org Subject: =?utf-8?q?=5BGitHub=5D_=5Biotdb=5D_cmlmakahts_commented_on_a_change_in_pull_?= =?utf-8?q?request_=233474=3A_=5BIOTDB-1456=5D_Fix_Error_occurred_while_exec?= =?utf-8?q?uting_delete_timeseries_statement?= Message-ID: <162675158125.6490.9885485351608803623.asfpy@gitbox.apache.org> Date: Tue, 20 Jul 2021 03:26:21 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit References: In-Reply-To: cmlmakahts commented on a change in pull request #3474: URL: https://github.com/apache/iotdb/pull/3474#discussion_r672775050 ########## File path: cluster/src/main/java/org/apache/iotdb/cluster/log/applier/BaseApplier.java ########## @@ -102,6 +104,16 @@ private void handleBatchProcessException(BatchProcessException e, PhysicalPlan p && plan instanceof BatchPlan) { ((BatchPlan) plan).setIsExecuted(i); } + + if (plan instanceof DeleteTimeSeriesPlan) { + if (status != null && status.getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) { + if (status.getCode() != TSStatusCode.TIMESERIES_NOT_EXIST.getStatusCode()) { + logger.info("{} doesn't exist, it may has been deleted.", plan.getPaths().get(i)); + } else { + needThrow = true; Review comment: Delete operations indeed succeed, but the client may receives a error message which may confuse user. ![image](https://user-images.githubusercontent.com/82880298/126255831-ef30058b-b2af-4aa1-a7f4-f37dee938fef.png) I handle the exception to prevent this error message, skip all the timeseries_not_exist exception. Or codes in `forwardPlan` should cover BatchProcessException? ![image](https://user-images.githubusercontent.com/82880298/126257249-45c13c53-8a95-408b-81c0-f1260d979c9d.png) -- 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. To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org For queries about this service, please contact Infrastructure at: users@infra.apache.org