Skip to content

Commit

Permalink
try fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
liuneng1994 committed Mar 8, 2024
1 parent 18fe3a4 commit a07582a
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions cpp-ch/local-engine/Storages/Mergetree/SparkMergeTreeWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit a07582a

Please sign in to comment.