Uploaded image for project: 'CarbonData'
  1. CarbonData
  2. CARBONDATA-4225

Update is Slow and throws exception when auto compaction is enabled

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.2.0
    • None
    • None

    Description

      sql("""drop table if exists iud.autoMergeUpdate""").collect()
      sql("""create table iud.autoMergeUpdate (c1 string,c2 int,c3 string,c5 string) STORED AS |carbondata tblproperties('auto_load_merge'='true')""".stripMargin)
      sql(s"""LOAD DATA LOCAL INPATH '${color}resourcesPath/IUD/dest.csv' INTO table iud.autoMergeUpdate""")
      sql("update iud.autoMergeUpdate up_TAble set(up_table.C1)=('abc')").show()
      sql(s"""LOAD DATA LOCAL INPATH '${color}resourcesPath/IUD/dest.csv' INTO table iud.autoMergeUpdate""")
      sql("update iud.autoMergeUpdate up_TAble set(up_table.C1)=('abcd')").show()

       

      2021-06-21 19:00:38 ERROR CarbonDataRDDFactory$:674 - Exception in start compaction thread.
      org.apache.carbondata.core.exception.ConcurrentOperationException: update is in progress for table iud.zerorows, compaction operation is not allowed
      at org.apache.carbondata.spark.rdd.CarbonDataRDDFactory$.handleSegmentMerging(CarbonDataRDDFactory.scala:670)
      at org.apache.carbondata.spark.rdd.CarbonDataRDDFactory$.triggerEventsAfterLoading(CarbonDataRDDFactory.scala:581)
      at org.apache.carbondata.spark.rdd.CarbonDataRDDFactory$.loadCarbonData(CarbonDataRDDFactory.scala:559)
      at org.apache.spark.sql.execution.command.management.CarbonInsertIntoWithDf.insertData(CarbonInsertIntoWithDf.scala:193)
      at org.apache.spark.sql.execution.command.management.CarbonInsertIntoWithDf.process(CarbonInsertIntoWithDf.scala:150)
      at org.apache.spark.sql.execution.command.mutation.CarbonProjectForUpdateCommand.performUpdate(CarbonProjectForUpdateCommand.scala:361)
      at org.apache.spark.sql.execution.command.mutation.CarbonProjectForUpdateCommand.processData(CarbonProjectForUpdateCommand.scala:183)
      at org.apache.spark.sql.execution.command.DataCommand$$anonfun$run$2.apply(package.scala:146)
      at org.apache.spark.sql.execution.command.DataCommand$$anonfun$run$2.apply(package.scala:146)
      at org.apache.spark.sql.execution.command.Auditable$class.runWithAudit(package.scala:118)
      at org.apache.spark.sql.execution.command.DataCommand.runWithAudit(package.scala:144)
      at org.apache.spark.sql.execution.command.DataCommand.run(package.scala:146)
      at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult$lzycompute(commands.scala:70)
      at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult(commands.scala:68)
      at org.apache.spark.sql.execution.command.ExecutedCommandExec.executeCollect(commands.scala:79)
      at org.apache.spark.sql.Dataset$$anonfun$6.apply(Dataset.scala:190)
      at org.apache.spark.sql.Dataset$$anonfun$6.apply(Dataset.scala:190)
      at org.apache.spark.sql.Dataset$$anonfun$51.apply(Dataset.scala:3265)
      at org.apache.spark.sql.execution.SQLExecution$.withNewExecutionId(SQLExecution.scala:77)
      at org.apache.spark.sql.Dataset.withAction(Dataset.scala:3264)
      at org.apache.spark.sql.Dataset.<init>(Dataset.scala:190)
      at org.apache.spark.sql.Dataset$.ofRows(Dataset.scala:75)
      at org.apache.spark.sql.SparkSession.sql(SparkSession.scala:642)
      at org.apache.spark.sql.test.SparkTestQueryExecutor.sql(SparkTestQueryExecutor.scala:37)
      at org.apache.spark.sql.test.util.QueryTest.sql(QueryTest.scala:121)
      at org.apache.carbondata.spark.testsuite.iud.UpdateCarbonTableTestCase$$anonfun$62.apply$mcV$sp(UpdateCarbonTableTestCase.scala:1197)
      at org.apache.carbondata.spark.testsuite.iud.UpdateCarbonTableTestCase$$anonfun$62.apply(UpdateCarbonTableTestCase.scala:1190)
      at org.apache.carbondata.spark.testsuite.iud.UpdateCarbonTableTestCase$$anonfun$62.apply(UpdateCarbonTableTestCase.scala:1190)
      at org.scalatest.Transformer$$anonfun$apply$1.apply$mcV$sp(Transformer.scala:22)
      at org.scalatest.OutcomeOf$class.outcomeOf(OutcomeOf.scala:85)
      at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
      at org.scalatest.Transformer.apply(Transformer.scala:22)
      at org.scalatest.Transformer.apply(Transformer.scala:20)
      at org.scalatest.FunSuiteLike$$anon$1.apply(FunSuiteLike.scala:166)
      at org.apache.spark.sql.test.util.CarbonFunSuite.withFixture(CarbonFunSuite.scala:41)
      at org.scalatest.FunSuiteLike$class.invokeWithFixture$1(FunSuiteLike.scala:163)
      at org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:175)
      at org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:175)
      at org.scalatest.SuperEngine.runTestImpl(Engine.scala:306)
      at org.scalatest.FunSuiteLike$class.runTest(FunSuiteLike.scala:175)
      at org.scalatest.FunSuite.runTest(FunSuite.scala:1555)
      at org.scalatest.FunSuiteLike$$anonfun$runTests$1.apply(FunSuiteLike.scala:208)
      at org.scalatest.FunSuiteLike$$anonfun$runTests$1.apply(FunSuiteLike.scala:208)
      at org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:413)
      at org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:401)
      at scala.collection.immutable.List.foreach(List.scala:381)
      at org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:401)
      at org.scalatest.SuperEngine.org$scalatest$SuperEngine$$runTestsInBranch(Engine.scala:396)
      at org.scalatest.SuperEngine.runTestsImpl(Engine.scala:483)
      at org.scalatest.FunSuiteLike$class.runTests(FunSuiteLike.scala:208)
      at org.scalatest.FunSuite.runTests(FunSuite.scala:1555)
      at org.scalatest.Suite$class.run(Suite.scala:1424)
      at org.scalatest.FunSuite.org$scalatest$FunSuiteLike$$super$run(FunSuite.scala:1555)
      at org.scalatest.FunSuiteLike$$anonfun$run$1.apply(FunSuiteLike.scala:212)
      at org.scalatest.FunSuiteLike$$anonfun$run$1.apply(FunSuiteLike.scala:212)
      at org.scalatest.SuperEngine.runImpl(Engine.scala:545)
      at org.scalatest.FunSuiteLike$class.run(FunSuiteLike.scala:212)
      at org.apache.carbondata.spark.testsuite.iud.UpdateCarbonTableTestCase.org$scalatest$BeforeAndAfterAll$$super$run(UpdateCarbonTableTestCase.scala:37)
      at org.scalatest.BeforeAndAfterAll$class.liftedTree1$1(BeforeAndAfterAll.scala:257)
      at org.scalatest.BeforeAndAfterAll$class.run(BeforeAndAfterAll.scala:256)
      at org.apache.carbondata.spark.testsuite.iud.UpdateCarbonTableTestCase.run(UpdateCarbonTableTestCase.scala:37)
      at org.scalatest.tools.SuiteRunner.run(SuiteRunner.scala:55)
      at org.scalatest.tools.Runner$$anonfun$doRunRunRunDaDoRunRun$3.apply(Runner.scala:2563)
      at org.scalatest.tools.Runner$$anonfun$doRunRunRunDaDoRunRun$3.apply(Runner.scala:2557)
      at scala.collection.immutable.List.foreach(List.scala:381)
      at org.scalatest.tools.Runner$.doRunRunRunDaDoRunRun(Runner.scala:2557)
      at org.scalatest.tools.Runner$$anonfun$runOptionallyWithPassFailReporter$2.apply(Runner.scala:1044)
      at org.scalatest.tools.Runner$$anonfun$runOptionallyWithPassFailReporter$2.apply(Runner.scala:1043)
      at org.scalatest.tools.Runner$.withClassLoaderAndDispatchReporter(Runner.scala:2722)
      at org.scalatest.tools.Runner$.runOptionallyWithPassFailReporter(Runner.scala:1043)
      at org.scalatest.tools.Runner$.run(Runner.scala:883)
      at org.scalatest.tools.Runner.run(Runner.scala)
      at org.jetbrains.plugins.scala.testingSupport.scalaTest.ScalaTestRunner.runScalaTest2or3(ScalaTestRunner.java:38)
      at org.jetbrains.plugins.scala.testingSupport.scalaTest.ScalaTestRunner.main(ScalaTestRunner.java:25)
      2021-06-21 19:00:38 ERROR CarbonDataRDDFactory$:590 - Auto-Compaction has failed. Ignoring this exception because the load is passed.
      org.apache.carbondata.core.exception.ConcurrentOperationException: update is in progress for table iud.zerorows, compaction operation is not allowed
      at org.apache.carbondata.spark.rdd.CarbonDataRDDFactory$.handleSegmentMerging(CarbonDataRDDFactory.scala:670)
      at org.apache.carbondata.spark.rdd.CarbonDataRDDFactory$.triggerEventsAfterLoading(CarbonDataRDDFactory.scala:581)
      at org.apache.carbondata.spark.rdd.CarbonDataRDDFactory$.loadCarbonData(CarbonDataRDDFactory.scala:559)
      at org.apache.spark.sql.execution.command.management.CarbonInsertIntoWithDf.insertData(CarbonInsertIntoWithDf.scala:193)
      at org.apache.spark.sql.execution.command.management.CarbonInsertIntoWithDf.process(CarbonInsertIntoWithDf.scala:150)
      at org.apache.spark.sql.execution.command.mutation.CarbonProjectForUpdateCommand.performUpdate(CarbonProjectForUpdateCommand.scala:361)
      at org.apache.spark.sql.execution.command.mutation.CarbonProjectForUpdateCommand.processData(CarbonProjectForUpdateCommand.scala:183)
      at org.apache.spark.sql.execution.command.DataCommand$$anonfun$run$2.apply(package.scala:146)
      at org.apache.spark.sql.execution.command.DataCommand$$anonfun$run$2.apply(package.scala:146)
      at org.apache.spark.sql.execution.command.Auditable$class.runWithAudit(package.scala:118)
      at org.apache.spark.sql.execution.command.DataCommand.runWithAudit(package.scala:144)
      at org.apache.spark.sql.execution.command.DataCommand.run(package.scala:146)
      at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult$lzycompute(commands.scala:70)
      at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult(commands.scala:68)
      at org.apache.spark.sql.execution.command.ExecutedCommandExec.executeCollect(commands.scala:79)
      at org.apache.spark.sql.Dataset$$anonfun$6.apply(Dataset.scala:190)
      at org.apache.spark.sql.Dataset$$anonfun$6.apply(Dataset.scala:190)
      at org.apache.spark.sql.Dataset$$anonfun$51.apply(Dataset.scala:3265)
      at org.apache.spark.sql.execution.SQLExecution$.withNewExecutionId(SQLExecution.scala:77)
      at org.apache.spark.sql.Dataset.withAction(Dataset.scala:3264)
      at org.apache.spark.sql.Dataset.<init>(Dataset.scala:190)
      at org.apache.spark.sql.Dataset$.ofRows(Dataset.scala:75)
      at org.apache.spark.sql.SparkSession.sql(SparkSession.scala:642)
      at org.apache.spark.sql.test.SparkTestQueryExecutor.sql(SparkTestQueryExecutor.scala:37)
      at org.apache.spark.sql.test.util.QueryTest.sql(QueryTest.scala:121)
      at org.apache.carbondata.spark.testsuite.iud.UpdateCarbonTableTestCase$$anonfun$62.apply$mcV$sp(UpdateCarbonTableTestCase.scala:1197)
      at org.apache.carbondata.spark.testsuite.iud.UpdateCarbonTableTestCase$$anonfun$62.apply(UpdateCarbonTableTestCase.scala:1190)
      at org.apache.carbondata.spark.testsuite.iud.UpdateCarbonTableTestCase$$anonfun$62.apply(UpdateCarbonTableTestCase.scala:1190)
      at org.scalatest.Transformer$$anonfun$apply$1.apply$mcV$sp(Transformer.scala:22)
      at org.scalatest.OutcomeOf$class.outcomeOf(OutcomeOf.scala:85)
      at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
      at org.scalatest.Transformer.apply(Transformer.scala:22)
      at org.scalatest.Transformer.apply(Transformer.scala:20)
      at org.scalatest.FunSuiteLike$$anon$1.apply(FunSuiteLike.scala:166)
      at org.apache.spark.sql.test.util.CarbonFunSuite.withFixture(CarbonFunSuite.scala:41)
      at org.scalatest.FunSuiteLike$class.invokeWithFixture$1(FunSuiteLike.scala:163)
      at org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:175)
      at org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:175)
      at org.scalatest.SuperEngine.runTestImpl(Engine.scala:306)
      at org.scalatest.FunSuiteLike$class.runTest(FunSuiteLike.scala:175)
      at org.scalatest.FunSuite.runTest(FunSuite.scala:1555)
      at org.scalatest.FunSuiteLike$$anonfun$runTests$1.apply(FunSuiteLike.scala:208)
      at org.scalatest.FunSuiteLike$$anonfun$runTests$1.apply(FunSuiteLike.scala:208)
      at org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:413)
      at org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:401)
      at scala.collection.immutable.List.foreach(List.scala:381)
      at org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:401)
      at org.scalatest.SuperEngine.org$scalatest$SuperEngine$$runTestsInBranch(Engine.scala:396)
      at org.scalatest.SuperEngine.runTestsImpl(Engine.scala:483)
      at org.scalatest.FunSuiteLike$class.runTests(FunSuiteLike.scala:208)
      at org.scalatest.FunSuite.runTests(FunSuite.scala:1555)
      at org.scalatest.Suite$class.run(Suite.scala:1424)
      at org.scalatest.FunSuite.org$scalatest$FunSuiteLike$$super$run(FunSuite.scala:1555)
      at org.scalatest.FunSuiteLike$$anonfun$run$1.apply(FunSuiteLike.scala:212)
      at org.scalatest.FunSuiteLike$$anonfun$run$1.apply(FunSuiteLike.scala:212)
      at org.scalatest.SuperEngine.runImpl(Engine.scala:545)
      at org.scalatest.FunSuiteLike$class.run(FunSuiteLike.scala:212)
      at org.apache.carbondata.spark.testsuite.iud.UpdateCarbonTableTestCase.org$scalatest$BeforeAndAfterAll$$super$run(UpdateCarbonTableTestCase.scala:37)
      at org.scalatest.BeforeAndAfterAll$class.liftedTree1$1(BeforeAndAfterAll.scala:257)
      at org.scalatest.BeforeAndAfterAll$class.run(BeforeAndAfterAll.scala:256)
      at org.apache.carbondata.spark.testsuite.iud.UpdateCarbonTableTestCase.run(UpdateCarbonTableTestCase.scala:37)
      at org.scalatest.tools.SuiteRunner.run(SuiteRunner.scala:55)
      at org.scalatest.tools.Runner$$anonfun$doRunRunRunDaDoRunRun$3.apply(Runner.scala:2563)
      at org.scalatest.tools.Runner$$anonfun$doRunRunRunDaDoRunRun$3.apply(Runner.scala:2557)
      at scala.collection.immutable.List.foreach(List.scala:381)
      at org.scalatest.tools.Runner$.doRunRunRunDaDoRunRun(Runner.scala:2557)
      at org.scalatest.tools.Runner$$anonfun$runOptionallyWithPassFailReporter$2.apply(Runner.scala:1044)
      at org.scalatest.tools.Runner$$anonfun$runOptionallyWithPassFailReporter$2.apply(Runner.scala:1043)
      at org.scalatest.tools.Runner$.withClassLoaderAndDispatchReporter(Runner.scala:2722)
      at org.scalatest.tools.Runner$.runOptionallyWithPassFailReporter(Runner.scala:1043)
      at org.scalatest.tools.Runner$.run(Runner.scala:883)
      at org.scalatest.tools.Runner.run(Runner.scala)
      at org.jetbrains.plugins.scala.testingSupport.scalaTest.ScalaTestRunner.runScalaTest2or3(ScalaTestRunner.java:38)
      at org.jetbrains.plugins.scala.testingSupport.scalaTest.ScalaTestRunner.main(ScalaTestRunner.java:25)
      -----------------

      Updated Row Count

      -----------------

      10

      -----------------

      Attachments

        Activity

          People

            indhumuthumurugesh Indhumathi
            indhumuthumurugesh Indhumathi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2h
                2h