From a07582a9ad542ee3cd81dd4e08aaeb91d6654f7a Mon Sep 17 00:00:00 2001 From: liuneng1994 Date: Fri, 8 Mar 2024 16:46:18 +0800 Subject: [PATCH] try fix bug --- .../Mergetree/SparkMergeTreeWriter.cpp | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/cpp-ch/local-engine/Storages/Mergetree/SparkMergeTreeWriter.cpp b/cpp-ch/local-engine/Storages/Mergetree/SparkMergeTreeWriter.cpp index 1112056708c0d..0b83f5032a3cd 100644 --- a/cpp-ch/local-engine/Storages/Mergetree/SparkMergeTreeWriter.cpp +++ b/cpp-ch/local-engine/Storages/Mergetree/SparkMergeTreeWriter.cpp @@ -205,25 +205,25 @@ MergeTreeDataWriter::TemporaryPart SparkMergeTreeWriter::writeTempPart( new_data_part->minmax_idx = std::move(minmax_idx); SyncGuardPtr sync_guard; - if (new_data_part->isStoredOnDisk()) - { - /// The name could be non-unique in case of stale files from previous runs. - String full_path = new_data_part->getDataPartStorage().getFullPath(); + // if (new_data_part->isStoredOnDisk()) + // { + /// The name could be non-unique in case of stale files from previous runs. + String full_path = new_data_part->getDataPartStorage().getFullPath(); - if (new_data_part->getDataPartStorage().exists()) - { - // LOG_WARNING(log, "Removing old temporary directory {}", full_path); - data_part_storage->removeRecursive(); - } + if (new_data_part->getDataPartStorage().exists()) + { + // LOG_WARNING(log, "Removing old temporary directory {}", full_path); + data_part_storage->removeRecursive(); + } - data_part_storage->createDirectories(); + data_part_storage->createDirectories(); - if (storage.getSettings()->fsync_part_directory) - { - const auto disk = data_part_volume->getDisk(); - sync_guard = disk->getDirectorySyncGuard(full_path); - } + if (storage.getSettings()->fsync_part_directory) + { + const auto disk = data_part_volume->getDisk(); + sync_guard = disk->getDirectorySyncGuard(full_path); } + // } /// This effectively chooses minimal compression method: /// either default lz4 or compression method with zero thresholds on absolute and relative part size.