From issues-return-30005-archive-asf-public=cust-asf.ponee.io@carbondata.apache.org Fri Jan 5 07:45:02 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id BC652180647 for ; Fri, 5 Jan 2018 07:45:02 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id ABD89160C27; Fri, 5 Jan 2018 06:45:02 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E7BB2160C19 for ; Fri, 5 Jan 2018 07:45:01 +0100 (CET) Received: (qmail 35607 invoked by uid 500); 5 Jan 2018 06:45:01 -0000 Mailing-List: contact issues-help@carbondata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@carbondata.apache.org Delivered-To: mailing list issues@carbondata.apache.org Received: (qmail 35598 invoked by uid 99); 5 Jan 2018 06:45:00 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Jan 2018 06:45:00 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D3096E110A; Fri, 5 Jan 2018 06:45:00 +0000 (UTC) From: jackylk To: issues@carbondata.apache.org Reply-To: issues@carbondata.apache.org References: In-Reply-To: Subject: [GitHub] carbondata pull request #1711: [CARBONDATA-1754][BugFix] Fixed issue occurin... Content-Type: text/plain Message-Id: <20180105064500.D3096E110A@git1-us-west.apache.org> Date: Fri, 5 Jan 2018 06:45:00 +0000 (UTC) Github user jackylk commented on a diff in the pull request: https://github.com/apache/carbondata/pull/1711#discussion_r159816797 --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonAlterTableCompactionCommand.scala --- @@ -79,6 +81,14 @@ case class CarbonAlterTableCompactionCommand( relation.carbonTable } + val isLoadInProgress = SegmentStatusManager.checkIfAnyLoadInProgressForTable(table) + if (isLoadInProgress) { + val message = "Cannot run data loading and compaction on same table concurrently. " + + "Please wait for load to finish" + LOGGER.error(message) + throw new Exception(message) --- End diff -- Better to create a new exception class for this kind of error, you can name it `ConcurrentOperationException`. We can use this in other similar places in the future. ---