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 2021/03/18 09:23:43 UTC

[GitHub] [carbondata] kunal642 commented on a change in pull request #4109: [WIP] Fix various concurrent issues with clean files

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



##########
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:
       move this method call in canDeleteThisLoad().. and refactor the other places as well




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