You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by jackylk <gi...@git.apache.org> on 2018/01/05 06:45:00 UTC

[GitHub] carbondata pull request #1711: [CARBONDATA-1754][BugFix] Fixed issue occurin...

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.


---