From 763dfd7895188b6a00e8987a17925a8221660386 Mon Sep 17 00:00:00 2001 From: alesapin Date: Thu, 3 Feb 2022 12:14:00 +0300 Subject: [PATCH] Fix write ahead log --- src/Storages/MergeTree/MergeTreeWriteAheadLog.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Storages/MergeTree/MergeTreeWriteAheadLog.cpp b/src/Storages/MergeTree/MergeTreeWriteAheadLog.cpp index 694357ab0c2..8105d9d2ae4 100644 --- a/src/Storages/MergeTree/MergeTreeWriteAheadLog.cpp +++ b/src/Storages/MergeTree/MergeTreeWriteAheadLog.cpp @@ -109,6 +109,8 @@ void MergeTreeWriteAheadLog::rotate(const std::unique_lock &) + toString(min_block_number) + "_" + toString(max_block_number) + WAL_FILE_EXTENSION; + /// Finalize stream before file rename + out->finalize(); disk->replaceFile(path, storage.getRelativeDataPath() + new_name); init(); }