vikramahuja1001 commented on a change in pull request #4066: URL: https://github.com/apache/carbondata/pull/4066#discussion_r549418847
########## File path: integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/events/CleanFilesPostEventListener.scala ########## @@ -133,16 +134,16 @@ class CleanFilesPostEventListener extends OperationEventListener with Logging { val carbonFile = FileFactory .getCarbonFile(CarbonTablePath .getSegmentPath(indexTable.getTablePath, detail.getLoadName)) + LOGGER.info(s"Deleting segment folder: ${carbonFile.getName}") CarbonUtil.deleteFoldersAndFiles(carbonFile) } unnecessarySegmentsOfSI.foreach { detail => detail.setSegmentStatus(segToStatusMap(detail.getLoadName)) detail.setVisibility("false") } - SegmentStatusManager.writeLoadDetailsIntoFile( - indexTable.getMetadataPath + CarbonTablePath.TABLE_STATUS_FILE, - unnecessarySegmentsOfSI.toArray) + indexTable.getMetadataPath + CarbonCommonConstants.FILE_SEPARATOR + + CarbonTablePath.TABLE_STATUS_FILE, indexTableMetadataDetails.toArray) Review comment: .filter in this case do not create new duplicate objects, but is just a pointer to that object. When something is changed in `unnecessarySegmentsOfSI`, it will automatically be changed in `indexTableMetadataDetails` 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: us...@infra.apache.org