Github user xuchuanyin commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2851#discussion_r228010750
--- Diff:
datamap/bloom/src/main/java/org/apache/carbondata/datamap/bloom/BloomIndexFileStore.java
---
@@ -70,27 +73,37 @@ public boolean accept(CarbonFile file) {
}
});
+ // check whether need to merge
String mergeShardPath = dmSegmentPathString + File.separator +
MERGE_BLOOM_INDEX_SHARD_NAME;
String mergeInprogressFile = dmSegmentPathString + File.separator +
MERGE_INPROGRESS_FILE;
try {
- // delete mergeShard folder if exists
- if (FileFactory.isFileExist(mergeShardPath)) {
- FileFactory.deleteFile(mergeShardPath,
FileFactory.getFileType(mergeShardPath));
+ if (shardPaths.length == 0 ||
FileFactory.isFileExist(mergeShardPath)) {
+ LOGGER.info("No shard data to merge or already merged for path " +
mergeShardPath);
--- End diff --
when will this line be reached?
---