ajantha-bhat commented on a change in pull request #4044: URL: https://github.com/apache/carbondata/pull/4044#discussion_r537248838
########## File path: core/src/main/java/org/apache/carbondata/core/util/CleanFilesUtil.java ########## @@ -163,8 +164,13 @@ private static void getStaleSegmentFiles(CarbonTable carbonTable, List<String> s } Set<String> loadNameSet = Arrays.stream(details).map(LoadMetadataDetails::getLoadName) .collect(Collectors.toSet()); - List<String> staleSegments = segmentFiles.stream().filter(segmentFile -> !loadNameSet.contains( - DataFileUtil.getSegmentNoFromSegmentFile(segmentFile))).collect(Collectors.toList()); + // get all stale segment files, not include compaction segments Review comment: please add a detail comments about why we need to ignore stale compacted (x.y) segment. ---------------------------------------------------------------- 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