[GitHub] [carbondata] vikramahuja1001 commented on a change in pull request #4109: [CARBONDATA-4154] Fix various concurrent issues with clean files

Posted by GitBox on
URL: http://apache-carbondata-dev-mailing-list-archive.168.s1.nabble.com/GitHub-carbondata-vikramahuja1001-opened-a-new-pull-request-4109-WIP-Fix-various-concurrent-issues-ws-tp106942p106986.html


vikramahuja1001 commented on a change in pull request #4109:
URL: https://github.com/apache/carbondata/pull/4109#discussion_r596825541



##########
File path: core/src/main/java/org/apache/carbondata/core/util/DeleteLoadFolders.java
##########
@@ -118,14 +118,16 @@ private static void physicalFactAndMeasureMetadataDeletion(CarbonTable carbonTab
       if (canDeleteThisLoad(oneLoad, isForceDelete, cleanStaleInProgress)) {
         try {
           if (oneLoad.getSegmentFile() != null) {
-            String tablePath = carbonTable.getAbsoluteTableIdentifier().getTablePath();
-            Segment segment = new Segment(oneLoad.getLoadName(), oneLoad.getSegmentFile());
-            // No need to delete physical data for external segments.
-            if (oneLoad.getPath() == null || oneLoad.getPath().equalsIgnoreCase("NA")) {
-              SegmentFileStore.deleteSegment(tablePath, segment, specs, updateStatusManager);
+            if (canSegmentLockBeAcquired(oneLoad, carbonTable.getAbsoluteTableIdentifier())) {

Review comment:
       done




----------------------------------------------------------------
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:
[hidden email]