From 517c2ae8dfc67d9a280ecfadf917c28758e26344 Mon Sep 17 00:00:00 2001 From: fenglv Date: Thu, 7 Apr 2022 02:20:20 +0000 Subject: [PATCH] Fix data race in StorgeFileLog --- src/Storages/FileLog/StorageFileLog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Storages/FileLog/StorageFileLog.cpp b/src/Storages/FileLog/StorageFileLog.cpp index 4fb19b12bab..d7c732aee02 100644 --- a/src/Storages/FileLog/StorageFileLog.cpp +++ b/src/Storages/FileLog/StorageFileLog.cpp @@ -720,7 +720,7 @@ bool StorageFileLog::streamToViews() assertBlocksHaveEqualStructure(input.getHeader(), block_io.pipeline.getHeader(), "StorageFileLog streamToViews"); - size_t rows = 0; + std::atomic rows = 0; { block_io.pipeline.complete(std::move(input)); block_io.pipeline.setNumThreads(max_streams_number);