You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by GitBox <gi...@apache.org> on 2020/12/06 15:44:08 UTC

[GitHub] [carbondata] Kejian-Li opened a new pull request #4043: IUD Concurrency Improvement

Kejian-Li opened a new pull request #4043:
URL: https://github.com/apache/carbondata/pull/4043


   Why is this PR needed?
   Improve concurrency for Insert/Update/Delete
   
   What changes were proposed in this PR?
   Remove update lock in Update and Delete Command and lock the segments operared by Update and Delete Command.
   
   Does this PR introduce any user interface change?
   No
   Is any new testcase added?
   Yes
       
   


----------------------------------------------------------------
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



[GitHub] [carbondata] Zhangshunyu commented on pull request #4043: IUD Concurrency Improvement

Posted by GitBox <gi...@apache.org>.
Zhangshunyu commented on pull request #4043:
URL: https://github.com/apache/carbondata/pull/4043#issuecomment-739612930


   retest this please


----------------------------------------------------------------
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



[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4043: IUD Concurrency Improvement

Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4043:
URL: https://github.com/apache/carbondata/pull/4043#issuecomment-739539209






----------------------------------------------------------------
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



[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4043: IUD Concurrency Improvement

Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4043:
URL: https://github.com/apache/carbondata/pull/4043#issuecomment-739619817


   Build Failed  with Spark 2.4.5, Please check CI http://121.244.95.60:12545/job/ApacheCarbon_PR_Builder_2.4.5/3329/
   


----------------------------------------------------------------
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



[GitHub] [carbondata] marchpure commented on a change in pull request #4043: IUD Concurrency Improvement

Posted by GitBox <gi...@apache.org>.
marchpure commented on a change in pull request #4043:
URL: https://github.com/apache/carbondata/pull/4043#discussion_r537069006



##########
File path: integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/iud/IUDConcurrencyTestCase.scala
##########
@@ -0,0 +1,474 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.carbondata.spark.testsuite.iud
+
+import java.sql.Date
+import java.text.SimpleDateFormat
+import java.util.concurrent.{Callable, Executors, Future}
+
+import mockit.{Mock, MockUp}
+import org.apache.spark.sql.{DataFrame, Row, SaveMode}
+import org.apache.spark.sql.execution.command.mutation.{CarbonProjectForDeleteCommand, CarbonProjectForUpdateCommand}
+import org.apache.spark.sql.test.util.QueryTest
+import org.apache.spark.sql.types.StructType
+import org.scalatest.BeforeAndAfterAll
+
+import org.apache.carbondata.core.constants.CarbonCommonConstants
+import org.apache.carbondata.core.exception.ConcurrentOperationException
+import org.apache.carbondata.core.util.CarbonProperties
+import org.apache.carbondata.spark.rdd.CarbonDataRDDFactory
+
+class IUDConcurrencyTestCase extends QueryTest with BeforeAndAfterAll {
+
+  val ONE_LOAD_SIZE = 5
+  var testData: DataFrame = _
+
+  override def beforeAll(): Unit = {
+    sql("DROP DATABASE IF EXISTS iud_concurrency CASCADE")
+    sql("CREATE DATABASE iud_concurrency")
+    sql("USE iud_concurrency")
+
+    buildTestData()
+
+    createTable("orders", testData.schema)
+    createTable("temp_table", testData.schema)
+    createTable("orders_temp_table", testData.schema)
+
+    testData.write
+      .format("carbondata")
+      .option("tableName", "temp_table")
+      .option("tempCSV", "false")
+      .mode(SaveMode.Overwrite)
+      .save()
+
+    sql("insert into orders select * from temp_table")
+    sql("insert into orders_temp_table select * from temp_table")
+  }
+
+  private def buildTestData(): Unit = {
+    CarbonProperties.getInstance()
+      .addProperty(CarbonCommonConstants.CARBON_DATE_FORMAT, "yyyy-MM-dd")
+    import sqlContext.implicits._
+    val sdf = new SimpleDateFormat("yyyy-MM-dd")
+
+    testData = sqlContext.sparkSession.sparkContext.parallelize(1 to ONE_LOAD_SIZE)
+      .map(value => (value, new Date(sdf.parse("2015-07-" + (value % 10 + 10)).getTime),
+        "china", "aaa" + value, "phone" + 555 * value, "ASD" + (60000 + value), 14999 + value,
+        "ordersTable" + value))
+      .toDF("o_id", "o_date", "o_country", "o_name",
+        "o_phonetype", "o_serialname", "o_salary", "o_comment")
+  }
+
+  private def createTable(tableName: String, schema: StructType): Unit = {
+    val schemaString = schema.fields.map(x => x.name + " " + x.dataType.typeName).mkString(", ")
+    sql(s"CREATE TABLE $tableName ($schemaString) stored as carbondata tblproperties" +
+      s"('sort_scope'='local_sort', 'sort_columns'='o_country, o_name, o_phonetype, o_serialname," +
+      s"o_comment")
+  }
+
+  // ----------------------- Insert and Update ------------------------
+  // update -> insert -> update
+  test("Update should success when insert completes before it") {
+    val updateSql = "update orders set (o_country)=('newCountry') where o_country='china'"
+    val insertSql = "insert into orders select * from orders_temp_table"
+
+    val mockInsert = new MockUp[CarbonProjectForUpdateCommand]() {
+      @Mock
+      def mockForConcurrentInsertTest(): Unit = {

Review comment:
       you shall not mock in this way.

##########
File path: integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/iud/IUDConcurrencyTestCase.scala
##########
@@ -0,0 +1,474 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.carbondata.spark.testsuite.iud
+
+import java.sql.Date
+import java.text.SimpleDateFormat
+import java.util.concurrent.{Callable, Executors, Future}
+
+import mockit.{Mock, MockUp}
+import org.apache.spark.sql.{DataFrame, Row, SaveMode}
+import org.apache.spark.sql.execution.command.mutation.{CarbonProjectForDeleteCommand, CarbonProjectForUpdateCommand}
+import org.apache.spark.sql.test.util.QueryTest
+import org.apache.spark.sql.types.StructType
+import org.scalatest.BeforeAndAfterAll
+
+import org.apache.carbondata.core.constants.CarbonCommonConstants
+import org.apache.carbondata.core.exception.ConcurrentOperationException
+import org.apache.carbondata.core.util.CarbonProperties
+import org.apache.carbondata.spark.rdd.CarbonDataRDDFactory
+
+class IUDConcurrencyTestCase extends QueryTest with BeforeAndAfterAll {
+
+  val ONE_LOAD_SIZE = 5
+  var testData: DataFrame = _
+
+  override def beforeAll(): Unit = {
+    sql("DROP DATABASE IF EXISTS iud_concurrency CASCADE")
+    sql("CREATE DATABASE iud_concurrency")
+    sql("USE iud_concurrency")
+
+    buildTestData()
+
+    createTable("orders", testData.schema)
+    createTable("temp_table", testData.schema)
+    createTable("orders_temp_table", testData.schema)
+
+    testData.write
+      .format("carbondata")
+      .option("tableName", "temp_table")
+      .option("tempCSV", "false")
+      .mode(SaveMode.Overwrite)
+      .save()
+
+    sql("insert into orders select * from temp_table")
+    sql("insert into orders_temp_table select * from temp_table")
+  }
+
+  private def buildTestData(): Unit = {
+    CarbonProperties.getInstance()
+      .addProperty(CarbonCommonConstants.CARBON_DATE_FORMAT, "yyyy-MM-dd")
+    import sqlContext.implicits._
+    val sdf = new SimpleDateFormat("yyyy-MM-dd")
+
+    testData = sqlContext.sparkSession.sparkContext.parallelize(1 to ONE_LOAD_SIZE)

Review comment:
       use insert instead of saving dataframe 

##########
File path: integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/iud/IUDConcurrencyTestCase.scala
##########
@@ -0,0 +1,474 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.carbondata.spark.testsuite.iud
+
+import java.sql.Date
+import java.text.SimpleDateFormat
+import java.util.concurrent.{Callable, Executors, Future}
+
+import mockit.{Mock, MockUp}
+import org.apache.spark.sql.{DataFrame, Row, SaveMode}
+import org.apache.spark.sql.execution.command.mutation.{CarbonProjectForDeleteCommand, CarbonProjectForUpdateCommand}
+import org.apache.spark.sql.test.util.QueryTest
+import org.apache.spark.sql.types.StructType
+import org.scalatest.BeforeAndAfterAll
+
+import org.apache.carbondata.core.constants.CarbonCommonConstants
+import org.apache.carbondata.core.exception.ConcurrentOperationException
+import org.apache.carbondata.core.util.CarbonProperties
+import org.apache.carbondata.spark.rdd.CarbonDataRDDFactory
+
+class IUDConcurrencyTestCase extends QueryTest with BeforeAndAfterAll {
+
+  val ONE_LOAD_SIZE = 5
+  var testData: DataFrame = _
+
+  override def beforeAll(): Unit = {
+    sql("DROP DATABASE IF EXISTS iud_concurrency CASCADE")
+    sql("CREATE DATABASE iud_concurrency")
+    sql("USE iud_concurrency")
+
+    buildTestData()
+
+    createTable("orders", testData.schema)
+    createTable("temp_table", testData.schema)
+    createTable("orders_temp_table", testData.schema)
+
+    testData.write
+      .format("carbondata")
+      .option("tableName", "temp_table")
+      .option("tempCSV", "false")
+      .mode(SaveMode.Overwrite)
+      .save()
+
+    sql("insert into orders select * from temp_table")
+    sql("insert into orders_temp_table select * from temp_table")
+  }
+
+  private def buildTestData(): Unit = {
+    CarbonProperties.getInstance()
+      .addProperty(CarbonCommonConstants.CARBON_DATE_FORMAT, "yyyy-MM-dd")
+    import sqlContext.implicits._
+    val sdf = new SimpleDateFormat("yyyy-MM-dd")
+
+    testData = sqlContext.sparkSession.sparkContext.parallelize(1 to ONE_LOAD_SIZE)
+      .map(value => (value, new Date(sdf.parse("2015-07-" + (value % 10 + 10)).getTime),
+        "china", "aaa" + value, "phone" + 555 * value, "ASD" + (60000 + value), 14999 + value,
+        "ordersTable" + value))
+      .toDF("o_id", "o_date", "o_country", "o_name",
+        "o_phonetype", "o_serialname", "o_salary", "o_comment")
+  }
+
+  private def createTable(tableName: String, schema: StructType): Unit = {
+    val schemaString = schema.fields.map(x => x.name + " " + x.dataType.typeName).mkString(", ")
+    sql(s"CREATE TABLE $tableName ($schemaString) stored as carbondata tblproperties" +
+      s"('sort_scope'='local_sort', 'sort_columns'='o_country, o_name, o_phonetype, o_serialname," +
+      s"o_comment")
+  }
+
+  // ----------------------- Insert and Update ------------------------
+  // update -> insert -> update
+  test("Update should success when insert completes before it") {
+    val updateSql = "update orders set (o_country)=('newCountry') where o_country='china'"
+    val insertSql = "insert into orders select * from orders_temp_table"
+
+    val mockInsert = new MockUp[CarbonProjectForUpdateCommand]() {
+      @Mock
+      def mockForConcurrentInsertTest(): Unit = {
+        val insertFuture = runSqlAsync(insertSql)
+        assert(insertFuture.get().contains("PASS"))
+      }
+    }
+
+    val updateFuture = runSqlAsync(updateSql)
+    assert(updateFuture.get().contains("PASS"))
+    mockInsert.tearDown()
+
+    checkAnswer(
+      sql("select count(1) from orders o_country='newCountry'"), Seq(Row(ONE_LOAD_SIZE)))
+    checkAnswer(
+      sql("select count(1) from orders where o_country='china'"), Seq(Row(ONE_LOAD_SIZE)))
+  }
+
+  // insert -> update -> insert

Review comment:
       "insert -> update -> insert" 
   
   Confused. What do you want to say?




----------------------------------------------------------------
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



[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4043: IUD Concurrency Improvement

Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4043:
URL: https://github.com/apache/carbondata/pull/4043#issuecomment-739620866






----------------------------------------------------------------
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



[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4043: IUD Concurrency Improvement

Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4043:
URL: https://github.com/apache/carbondata/pull/4043#issuecomment-739523165






----------------------------------------------------------------
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



[GitHub] [carbondata] marchpure commented on pull request #4043: IUD Concurrency Improvement

Posted by GitBox <gi...@apache.org>.
marchpure commented on pull request #4043:
URL: https://github.com/apache/carbondata/pull/4043#issuecomment-739523754


   CI fails. Please fix the CI failures


----------------------------------------------------------------
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



[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4043: IUD Concurrency Improvement

Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4043:
URL: https://github.com/apache/carbondata/pull/4043#issuecomment-739634097


   Build Failed  with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/5062/
   


----------------------------------------------------------------
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



[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4043: IUD Concurrency Improvement

Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4043:
URL: https://github.com/apache/carbondata/pull/4043#issuecomment-748003528


   Build Failed  with Spark 2.4.5, Please check CI http://121.244.95.60:12545/job/ApacheCarbon_PR_Builder_2.4.5/3297/
   


----------------------------------------------------------------
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



[GitHub] [carbondata] marchpure commented on a change in pull request #4043: IUD Concurrency Improvement

Posted by GitBox <gi...@apache.org>.
marchpure commented on a change in pull request #4043:
URL: https://github.com/apache/carbondata/pull/4043#discussion_r537066618



##########
File path: core/src/main/java/org/apache/carbondata/core/mutate/CarbonUpdateUtil.java
##########
@@ -341,8 +341,11 @@ public static boolean updateTableMetadataStatus(Set<String> updatedSegmentsList,
                   // this means for first time it is getting updated .
                   loadMetadata.setUpdateDeltaStartTimestamp(updatedTimeStamp);
                 }
-                // update end timestamp for each time.
+                // update delta end timestamp for each time.
                 loadMetadata.setUpdateDeltaEndTimestamp(updatedTimeStamp);
+                // record end timestamp of operation each time
+                long operationEndTimestamp = System.currentTimeMillis();
+                loadMetadata.setLatestUpdateEndTimestamp(String.valueOf(operationEndTimestamp));

Review comment:
       take care about format

##########
File path: integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonDataRDDFactory.scala
##########
@@ -334,6 +334,8 @@ object CarbonDataRDDFactory {
     val segmentLock = CarbonLockFactory.getCarbonLockObj(carbonTable.getAbsoluteTableIdentifier,
       CarbonTablePath.addSegmentPrefix(carbonLoadModel.getSegmentId) + LockUsage.LOCK)
 
+    mockForConcurrentTest()

Review comment:
       remove it

##########
File path: core/src/main/java/org/apache/carbondata/core/statusmanager/LoadMetadataDetails.java
##########
@@ -453,6 +456,14 @@ public void setExtraInfo(String extraInfo) {
     this.extraInfo = extraInfo;
   }
 
+  public String getLatestUpdateEndTimestamp() {
+    return latestUpdateEndTimestamp;
+  }
+
+  public void setLatestUpdateEndTimestamp(String latestUpdateEndTimestamp) {

Review comment:
       don't add parameters in tablestatus.

##########
File path: integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonDataRDDFactory.scala
##########
@@ -607,6 +609,14 @@ object CarbonDataRDDFactory {
     }
   }
 
+  def mockForConcurrentTest(): Unit = {

Review comment:
       remove it.

##########
File path: integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/CarbonProjectForDeleteCommand.scala
##########
@@ -25,9 +25,11 @@ import org.apache.spark.sql._
 import org.apache.spark.sql.catalyst.expressions.{Attribute, AttributeReference}
 import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan
 import org.apache.spark.sql.execution.command._
+import org.apache.spark.sql.execution.command.mutation.transaction.{TransactionManager, TransactionType}
 import org.apache.spark.sql.types.LongType
 
 import org.apache.carbondata.common.logging.LogServiceFactory
+import org.apache.carbondata.core.exception.ConcurrentOperationException

Review comment:
       just use exception. don't use ConcurrentOperationException

##########
File path: integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/CarbonProjectForUpdateCommand.scala
##########
@@ -113,8 +116,14 @@ case class CarbonProjectForUpdateCommand(
       updatedRowCount = updatedRowCountTmp
       if (updatedRowCount == 0) return Seq(Row(0L))
 
+      if (IUDCommonUtil.isTest()) {

Review comment:
       remove it.

##########
File path: integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/IUDCommonUtil.scala
##########
@@ -268,4 +270,43 @@ object IUDCommonUtil {
       case _ =>
     }
   }
+
+  def checkIfSegmentsAlreadyUpdated(
+      carbonTable: CarbonTable,
+      startTimestamp: String,
+      updatedSegments: util.Set[String]): Boolean = {
+
+    val loadMetadataDetails = SegmentStatusManager.readLoadMetadata(carbonTable.getMetadataPath)
+    var isChanged = false
+    breakable {
+      loadMetadataDetails
+        .filter(load => updatedSegments.contains(load.getLoadName))
+        .foreach(load =>
+          if (load.getLatestUpdateEndTimestamp != null &&

Review comment:
       use getTransctionId(). don't use getLatestUpdateEndTimestamp.

##########
File path: integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/CarbonProjectForUpdateCommand.scala
##########
@@ -152,6 +161,9 @@ case class CarbonProjectForUpdateCommand(
       IndexStoreManager.getInstance()
         .clearInvalidSegments(carbonTable, deletedSegmentList.asScala.toList.asJava)
     } catch {
+      case e: ConcurrentOperationException =>

Review comment:
       use exception. remove ConcurrentOperationException 

##########
File path: integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/IUDCommonUtil.scala
##########
@@ -268,4 +270,43 @@ object IUDCommonUtil {
       case _ =>
     }
   }
+
+  def checkIfSegmentsAlreadyUpdated(
+      carbonTable: CarbonTable,
+      startTimestamp: String,
+      updatedSegments: util.Set[String]): Boolean = {
+
+    val loadMetadataDetails = SegmentStatusManager.readLoadMetadata(carbonTable.getMetadataPath)
+    var isChanged = false
+    breakable {
+      loadMetadataDetails
+        .filter(load => updatedSegments.contains(load.getLoadName))
+        .foreach(load =>
+          if (load.getLatestUpdateEndTimestamp != null &&
+            load.getLatestUpdateEndTimestamp.toLong > startTimestamp.toLong) {
+            isChanged = true
+            break()
+          }
+        )
+    }
+    isChanged
+  }
+
+  def mockForConcurrentTest(carbonTable: CarbonTable,

Review comment:
       remove it.

##########
File path: integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/transaction/TransactionManager.scala
##########
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.sql.execution.command.mutation.transaction
+
+import org.apache.carbondata.core.metadata.schema.table.CarbonTable
+
+case class TransactionManager(carbonTable: CarbonTable) {
+
+  def beginTransaction(transactionType: TransactionType.Value): Transaction = {

Review comment:
       confused. only have beginTranscation. don't have commitTranscation

##########
File path: integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/transaction/TransactionType.scala
##########
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.sql.execution.command.mutation.transaction
+
+object TransactionType extends Enumeration {
+
+  val UPDATE = Value("Update")

Review comment:
       TransactionType is useful? 
   What's different with UpdateTranscation and DeleteTranscation?




----------------------------------------------------------------
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



[GitHub] [carbondata] Kejian-Li closed pull request #4043: IUD Concurrency Improvement

Posted by GitBox <gi...@apache.org>.
Kejian-Li closed pull request #4043:
URL: https://github.com/apache/carbondata/pull/4043


   


----------------------------------------------------------------
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



[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4043: IUD Concurrency Improvement

Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4043:
URL: https://github.com/apache/carbondata/pull/4043#issuecomment-766552570






----------------------------------------------------------------
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



[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4043: IUD Concurrency Improvement

Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4043:
URL: https://github.com/apache/carbondata/pull/4043#issuecomment-766554207


   Build Failed  with Spark 2.4.5, Please check CI http://121.244.95.60:12545/job/ApacheCarbon_PR_Builder_2.4.5/3302/
   


----------------------------------------------------------------
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



[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4043: IUD Concurrency Improvement

Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4043:
URL: https://github.com/apache/carbondata/pull/4043#issuecomment-766552570


   Build Failed  with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/5060/
   


----------------------------------------------------------------
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