Indhumathi27 commented on a change in pull request #3683: [CARBONDATA-3755]Fix 
clean up issue with respect to segmentMetadaInfo after update and clean files
URL: https://github.com/apache/carbondata/pull/3683#discussion_r399261249
 
 

 ##########
 File path: 
core/src/main/java/org/apache/carbondata/core/mutate/CarbonUpdateUtil.java
 ##########
 @@ -579,10 +580,28 @@ public static void cleanUpDeltaFiles(CarbonTable table, 
boolean forceDelete) thr
     }
     String UUID = String.valueOf(System.currentTimeMillis());
     List<Segment> segmentFilesToBeUpdatedLatest = new ArrayList<>();
+    CarbonFile segmentFilesLocation =
+        
FileFactory.getCarbonFile(CarbonTablePath.getSegmentFilesLocation(table.getTablePath()));
     for (Segment segment : segmentFilesToBeUpdated) {
-      String file =
-          SegmentFileStore.writeSegmentFile(table, segment.getSegmentNo(), 
UUID);
-      segmentFilesToBeUpdatedLatest.add(new Segment(segment.getSegmentNo(), 
file));
+      SegmentFileStore fileStore =
+          new SegmentFileStore(table.getTablePath(), 
segment.getSegmentFileName());
+      
segment.setSegmentMetaDataInfo(fileStore.getSegmentFile().getSegmentMetaDataInfo());
 
 Review comment:
   Can you please add a testcase for this issue, if possible

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to