Github user gvramana commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2513#discussion_r203414767
--- Diff:
integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonLoadDataCommand.scala
---
@@ -253,15 +257,39 @@ case class CarbonLoadDataCommand(
}
// First system has to partition the data first and then call the
load data
LOGGER.info(s"Initiating Direct Load for the Table :
($dbName.$tableName)")
- // Clean up the old invalid segment data before creating a new
entry for new load.
- SegmentStatusManager.deleteLoadsAndUpdateMetadata(table, false,
currPartitions)
- // add the start entry for the new load in the table status file
- if (updateModel.isEmpty && !table.isHivePartitionTable) {
- CarbonLoaderUtil.readAndUpdateLoadProgressInTableMeta(
- carbonLoadModel,
- isOverwriteTable)
- isUpdateTableStatusRequired = true
+
--- End diff --
Add function to acquire and release concurrent lock.
---