Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix race on Context::async_insert_queue #59082

Merged
merged 7 commits into from Mar 22, 2024
Merged

Conversation

tavplubix
Copy link
Member

@tavplubix tavplubix commented Jan 22, 2024

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

https://s3.amazonaws.com/clickhouse-test-reports/39507/fe1e326701b0566881dc7d51793125a911faa07e/integration_tests__tsan__[4_6].html

E           Exception: Sanitizer assert found for instance ==================
E           WARNING: ThreadSanitizer: data race (pid=8)
E             Write of size 8 at 0x7b9800002828 by main thread:
E               #0 std::__1::enable_if<is_move_constructible<DB::AsynchronousInsertQueue*>::value && is_move_assignable<DB::AsynchronousInsertQueue*>::value, void>::type std::__1::swap[abi:v15000]<DB::AsynchronousInsertQueue*>(DB::AsynchronousInsertQueue*&, DB::AsynchronousInsertQueue*&) build_docker/./contrib/llvm-project/libcxx/include/__utility/swap.h:37:7 (clickhouse+0x17b04969) (BuildId: eb5989d1636ee782991f7a4fb357694e51da5128)
E               #1 std::__1::shared_ptr<DB::AsynchronousInsertQueue>::swap[abi:v15000](std::__1::shared_ptr<DB::AsynchronousInsertQueue>&) build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:761:9 (clickhouse+0x17b04969)
E               #2 std::__1::shared_ptr<DB::AsynchronousInsertQueue>::reset[abi:v15000]() build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:768:22 (clickhouse+0x17b04969)
E               #3 DB::ContextSharedPart::shutdown() build_docker/./src/Interpreters/Context.cpp:559:28 (clickhouse+0x17b04969)
E               #4 DB::Context::shutdown() build_docker/./src/Interpreters/Context.cpp:4247:13 (clickhouse+0x17af4921) (BuildId: eb5989d1636ee782991f7a4fb357694e51da5128)
E               #5 DB::Server::main(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&)::$_1::operator()() const build_docker/./programs/server/Server.cpp:733:5 (clickhouse+0xf7740fb) (BuildId: eb5989d1636ee782991f7a4fb357694e51da5128)
E               #6 BasicScopeGuard<DB::Server::main(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&)::$_1>::invoke() build_docker/./base/base/../base/scope_guard.h:99:9 (clickhouse+0xf7740fb)
E               #7 BasicScopeGuard<DB::Server::main(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&)::$_1>::~BasicScopeGuard() build_docker/./base/base/../base/scope_guard.h:48:26 (clickhouse+0xf7740fb)
E               #8 DB::Server::main(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&) build_docker/./programs/server/Server.cpp:2053:1 (clickhouse+0xf7689fb) (BuildId: eb5989d1636ee782991f7a4fb357694e51da5128)
E               #9 Poco::Util::Application::run() build_docker/./base/poco/Util/src/Application.cpp:315:8 (clickhouse+0x1ded8afe) (BuildId: eb5989d1636ee782991f7a4fb357694e51da5128)
E               #10 DB::Server::run() build_docker/./programs/server/Server.cpp:413:25 (clickhouse+0xf753921) (BuildId: eb5989d1636ee782991f7a4fb357694e51da5128)
E               #11 Poco::Util::ServerApplication::run(int, char**) build_docker/./base/poco/Util/src/ServerApplication.cpp:131:9 (clickhouse+0x1def8854) (BuildId: eb5989d1636ee782991f7a4fb357694e51da5128)
E               #12 mainEntryClickHouseServer(int, char**) build_docker/./programs/server/Server.cpp:219:20 (clickhouse+0xf750a83) (BuildId: eb5989d1636ee782991f7a4fb357694e51da5128)
E               #13 main build_docker/./programs/main.cpp:515:12 (clickhouse+0x73bb84e) (BuildId: eb5989d1636ee782991f7a4fb357694e51da5128)
E           
E             Previous read of size 8 at 0x7b9800002828 by thread T679:
E               #0 std::__1::shared_ptr<DB::AsynchronousInsertQueue>::get[abi:v15000]() const build_docker/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:801:16 (clickhouse+0x17afa088) (BuildId: eb5989d1636ee782991f7a4fb357694e51da5128)
E               #1 DB::Context::getAsynchronousInsertQueue() const build_docker/./src/Interpreters/Context.cpp:4841:39 (clickhouse+0x17afa088)
E               #2 DB::executeQueryImpl(char const*, char const*, std::__1::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) build_docker/./src/Interpreters/executeQuery.cpp:927:33 (clickhouse+0x18cf9d95) (BuildId: eb5989d1636ee782991f7a4fb357694e51da5128)
E               #3 DB::executeQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum) build_docker/./src/Interpreters/executeQuery.cpp:1287:26 (clickhouse+0x18cf7617) (BuildId: eb5989d1636ee782991f7a4fb357694e51da5128)
E               #4 DB::tryToExecuteQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::Context>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) build_docker/./src/Databases/MySQL/MaterializedMySQLSyncThread.cpp:114:16 (clickhouse+0x1784c8f3) (BuildId: eb5989d1636ee782991f7a4fb357694e51da5128)
E               #5 DB::getTableOutput(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::shared_ptr<DB::Context>, bool) build_docker/./src/Databases/MySQL/MaterializedMySQLSyncThread.cpp:438:19 (clickhouse+0x1784d780) (BuildId: eb5989d1636ee782991f7a4fb357694e51da5128)
E               #6 DB::MaterializedMySQLSyncThread::Buffers::commit(std::__1::shared_ptr<DB::Context const>) build_docker/./src/Databases/MySQL/MaterializedMySQLSyncThread.cpp:1064:29 (clickhouse+0x1784d067) (BuildId: eb5989d1636ee782991f7a4fb357694e51da5128)
E               #7 DB::MaterializedMySQLSyncThread::flushBuffersData(DB::MaterializedMySQLSyncThread::Buffers&, DB::MaterializeMetadata&)::$_0::operator()() const build_docker/./src/Databases/MySQL/MaterializedMySQLSyncThread.cpp:667:57 (clickhouse+0x1785e34f) (BuildId: eb5989d1636ee782991f7a4fb357694e51da5128)
E               #8 decltype(std::declval<DB::MaterializedMySQLSyncThread::flushBuffersData(DB::MaterializedMySQLSyncThread::Buffers&, DB::MaterializeMetadata&)::$_0&>()()) std::__1::__invoke[abi:v15000]<DB::MaterializedMySQLSyncThread::flushBuffersData(DB::MaterializedMySQLSyncThread::Buffers&, DB::MaterializeMetadata&)::$_0&>(DB::MaterializedMySQLSyncThread::flushBuffersData(DB::MaterializedMySQLSyncThread::Buffers&, DB::MaterializeMetadata&)::$_0&) build_docker/./contrib/llvm-project/libcxx/include/__functional/invoke.h:394:23 (clickhouse+0x1785e34f)
E               #9 void std::__1::__invoke_void_return_wrapper<void, true>::__call<DB::MaterializedMySQLSyncThread::flushBuffersData(DB::MaterializedMySQLSyncThread::Buffers&, DB::MaterializeMetadata&)::$_0&>(DB::MaterializedMySQLSyncThread::flushBuffersData(DB::MaterializedMySQLSyncThread::Buffers&, DB::MaterializeMetadata&)::$_0&) build_docker/./contrib/llvm-project/libcxx/include/__functional/invoke.h:479:9 (clickhouse+0x1785e34f)
E               #10 std::__1::__function::__default_alloc_func<DB::MaterializedMySQLSyncThread::flushBuffersData(DB::MaterializedMySQLSyncThread::Buffers&, DB::MaterializeMetadata&)::$_0, void ()>::operator()[abi:v15000]() build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:235:12 (clickhouse+0x1785e34f)
E               #11 void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<DB::MaterializedMySQLSyncThread::flushBuffersData(DB::MaterializedMySQLSyncThread::Buffers&, DB::MaterializeMetadata&)::$_0, void ()>>(std::__1::__function::__policy_storage const*) build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:716:16 (clickhouse+0x1785e34f)
E               #12 std::__1::__function::__policy_func<void ()>::operator()[abi:v15000]() const build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:848:16 (clickhouse+0x1786cd4e) (BuildId: eb5989d1636ee782991f7a4fb357694e51da5128)
E               #13 std::__1::function<void ()>::operator()() const build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:1187:12 (clickhouse+0x1786cd4e)
E               #14 void DB::commitMetadata<std::__1::function<void ()> const&>(std::__1::function<void ()> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) build_docker/./src/Databases/MySQL/MaterializeMetadata.cpp:226:9 (clickhouse+0x1786cd4e)
E               #15 DB::MaterializeMetadata::transaction(DB::MySQLReplication::Position const&, std::__1::function<void ()> const&) build_docker/./src/Databases/MySQL/MaterializeMetadata.cpp:259:5 (clickhouse+0x17867b70) (BuildId: eb5989d1636ee782991f7a4fb357694e51da5128)
E               #16 DB::MaterializedMySQLSyncThread::flushBuffersData(DB::MaterializedMySQLSyncThread::Buffers&, DB::MaterializeMetadata&) build_docker/./src/Databases/MySQL/MaterializedMySQLSyncThread.cpp:667:14 (clickhouse+0x17847344) (BuildId: eb5989d1636ee782991f7a4fb357694e51da5128)
E               #17 DB::MaterializedMySQLSyncThread::synchronization() build_docker/./src/Databases/MySQL/MaterializedMySQLSyncThread.cpp:342:17 (clickhouse+0x17841b64) (BuildId: eb5989d1636ee782991f7a4fb357694e51da5128)
E               #18 DB::MaterializedMySQLSyncThread::startSynchronization()::$_0::operator()() const build_docker/./src/Databases/MySQL/MaterializedMySQLSyncThread.cpp:369:80 (clickhouse+0x178545ca) (BuildId: eb5989d1636ee782991f7a4fb357694e51da5128)
E               #19 decltype(std::declval<DB::MaterializedMySQLSyncThread::startSynchronization()::$_0&>()()) std::__1::__invoke[abi:v15000]<DB::MaterializedMySQLSyncThread::startSynchronization()::$_0&>(DB::MaterializedMySQLSyncThread::startSynchronization()::$_0&) build_docker/./contrib/llvm-project/libcxx/include/__functional/invoke.h:394:23 (clickhouse+0x178545ca)
E               #20 decltype(auto) std::__1::__apply_tuple_impl[abi:v15000]<DB::MaterializedMySQLSyncThread::startSynchronization()::$_0&, std::__1::tuple<>&>(DB::MaterializedMySQLSyncThread::startSynchronization()::$_0&, std::__1::tuple<>&, std::__1::__tuple_indices<>) build_docker/./contrib/llvm-project/libcxx/include/tuple:1789:1 (clickhouse+0x178545ca)
E               #21 decltype(auto) std::__1::apply[abi:v15000]<DB::MaterializedMySQLSyncThread::startSynchronization()::$_0&, std::__1::tuple<>&>(DB::MaterializedMySQLSyncThread::startSynchronization()::$_0&, std::__1::tuple<>&) build_docker/./contrib/llvm-project/libcxx/include/tuple:1798:1 (clickhouse+0x178545ca)
E               #22 ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::MaterializedMySQLSyncThread::startSynchronization()::$_0>(DB::MaterializedMySQLSyncThread::startSynchronization()::$_0&&)::'lambda'()::operator()() build_docker/./src/Common/ThreadPool.h:223:13 (clickhouse+0x178545ca)
E               #23 decltype(std::declval<DB::MaterializedMySQLSyncThread::startSynchronization()::$_0>()()) std::__1::__invoke[abi:v15000]<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::MaterializedMySQLSyncThread::startSynchronization()::$_0>(DB::MaterializedMySQLSyncThread::startSynchronization()::$_0&&)::'lambda'()&>(DB::MaterializedMySQLSyncThread::startSynchronization()::$_0&&) build_docker/./contrib/llvm-project/libcxx/include/__functional/invoke.h:394:23 (clickhouse+0x178545ca)
E               #24 void std::__1::__invoke_void_return_wrapper<void, true>::__call<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::MaterializedMySQLSyncThread::startSynchronization()::$_0>(DB::MaterializedMySQLSyncThread::startSynchronization()::$_0&&)::'lambda'()&>(ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::MaterializedMySQLSyncThread::startSynchronization()::$_0>(DB::MaterializedMySQLSyncThread::startSynchronization()::$_0&&)::'lambda'()&) build_docker/./contrib/llvm-project/libcxx/include/__functional/invoke.h:479:9 (clickhouse+0x178545ca)
E               #25 std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::MaterializedMySQLSyncThread::startSynchronization()::$_0>(DB::MaterializedMySQLSyncThread::startSynchronization()::$_0&&)::'lambda'(), void ()>::operator()[abi:v15000]() build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:235:12 (clickhouse+0x178545ca)
E               #26 void std::__1::__function::__policy_invoker<void ()>::__call_impl<std::__1::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true>::ThreadFromGlobalPoolImpl<DB::MaterializedMySQLSyncThread::startSynchronization()::$_0>(DB::MaterializedMySQLSyncThread::startSynchronization()::$_0&&)::'lambda'(), void ()>>(std::__1::__function::__policy_storage const*) build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:716:16 (clickhouse+0x178545ca)
E               #27 std::__1::__function::__policy_func<void ()>::operator()[abi:v15000]() const build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:848:16 (clickhouse+0xf7bbe4e) (BuildId: eb5989d1636ee782991f7a4fb357694e51da5128)
E               #28 std::__1::function<void ()>::operator()() const build_docker/./contrib/llvm-project/libcxx/include/__functional/function.h:1187:12 (clickhouse+0xf7bbe4e)
E               #29 ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) build_docker/./src/Common/ThreadPool.cpp:455:13 (clickhouse+0xf7bbe4e)
E               #30 void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, Priority, std::__1::optional<unsigned long>, bool)::'lambda0'()::operator()() const build_docker/./src/Common/ThreadPool.cpp:217:73 (clickhouse+0xf7c1d11) (BuildId: eb5989d1636ee782991f7a4fb357694e51da5128)
E               #31 decltype(std::declval<void>()()) std::__1::__invoke[abi:v15000]<void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, Priority, std::__1::optional<unsigned long>, bool)::'lambda0'()>(void&&) build_docker/./contrib/llvm-project/libcxx/include/__functional/invoke.h:394:23 (clickhouse+0xf7c1d11)
E               #32 void std::__1::__thread_execute[abi:v15000]<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, Priority, std::__1::optional<unsigned long>, bool)::'lambda0'()>(std::__1::tuple<void, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, Priority, std::__1::optional<unsigned long>, bool)::'lambda0'()>&, std::__1::__tuple_indices<>) build_docker/./contrib/llvm-project/libcxx/include/thread:284:5 (clickhouse+0xf7c1d11)
E               #33 void* std::__1::__thread_proxy[abi:v15000]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, Priority, std::__1::optional<unsigned long>, bool)::'lambda0'()>>(void*) build_docker/./contrib/llvm-project/libcxx/include/thread:295:5 (clickhouse+0xf7c1d11)

Introduced in #53547

@robot-clickhouse robot-clickhouse added the pr-not-for-changelog This PR should not be mentioned in the changelog label Jan 22, 2024
@robot-clickhouse
Copy link
Member

robot-clickhouse commented Jan 22, 2024

This is an automated comment for commit d190ee8 with description of existing statuses. It's updated for the latest CI running

❌ Click here to open a full report in a separate page

Check nameDescriptionStatus
AST fuzzerRuns randomly generated queries to catch program errors. The build type is optionally given in parenthesis. If it fails, ask a maintainer for help❌ failure
CI runningA meta-check that indicates the running CI. Normally, it's in success or pending state. The failed status indicates some problems with the PR⏳ pending
Successful checks
Check nameDescriptionStatus
A SyncThere's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS✅ success
ClickBenchRuns [ClickBench](https://github.com/ClickHouse/ClickBench/) with instant-attach table✅ success
ClickHouse build checkBuilds ClickHouse in various configurations for use in further steps. You have to fix the builds that fail. Build logs often has enough information to fix the error, but you might have to reproduce the failure locally. The cmake options can be found in the build log, grepping for cmake. Use these options and follow the general build process✅ success
Compatibility checkChecks that clickhouse binary runs on distributions with old libc versions. If it fails, ask a maintainer for help✅ success
Docker keeper imageThe check to build and optionally push the mentioned image to docker hub✅ success
Docker server imageThe check to build and optionally push the mentioned image to docker hub✅ success
Docs checkBuilds and tests the documentation✅ success
Fast testNormally this is the first check that is ran for a PR. It builds ClickHouse and runs most of stateless functional tests, omitting some. If it fails, further checks are not started until it is fixed. Look at the report to see which tests fail, then reproduce the failure locally as described here✅ success
Flaky testsChecks if new added or modified tests are flaky by running them repeatedly, in parallel, with more randomization. Functional tests are run 100 times with address sanitizer, and additional randomization of thread scheduling. Integrational tests are run up to 10 times. If at least once a new test has failed, or was too long, this check will be red. We don't allow flaky tests, read the doc✅ success
Install packagesChecks that the built packages are installable in a clear environment✅ success
Integration testsThe integration tests report. In parenthesis the package type is given, and in square brackets are the optional part/total tests✅ success
Mergeable CheckChecks if all other necessary checks are successful✅ success
PR CheckThere's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS✅ success
Performance ComparisonMeasure changes in query performance. The performance test report is described in detail here. In square brackets are the optional part/total tests✅ success
Stateful testsRuns stateful functional tests for ClickHouse binaries built in various configurations -- release, debug, with sanitizers, etc✅ success
Stateless testsRuns stateless functional tests for ClickHouse binaries built in various configurations -- release, debug, with sanitizers, etc✅ success
Stress testRuns stateless functional tests concurrently from several clients to detect concurrency-related errors✅ success
Style checkRuns a set of checks to keep the code style clean. If some of tests failed, see the related log from the report✅ success
Unit testsRuns the unit tests for different release types✅ success
Upgrade checkRuns stress tests on server version from last release and then tries to upgrade it to the version from the PR. It checks if the new server can successfully startup without any errors, crashes or sanitizer asserts✅ success

Copy link
Contributor

@jkartseva jkartseva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has caught my attention as I've been working on the asynchronous queue in #58486
Looks good to me, thanks for the fix!
Just curious, have you considered using std::atomic<std::shared_ptr> instead of locking the mutex?

@novikd
Copy link
Member

novikd commented Jan 23, 2024

Why doesn't it have a Bugfix label?

@tavplubix
Copy link
Member Author

Why doesn't it have a Bugfix label?

Because it's nearly impossible to provide a user-readable changelog entry for this fix

@tavplubix
Copy link
Member Author

Just curious, have you considered using std::atomicstd::shared_ptr instead of locking the mutex?

AFAIK there's a spinlock inside atomic shared pointer, so there's no big difference. Also, we use this mutex to protect other fields of [Shared]Context... And here I've realized that we actually have two mutexes: Context::mutex and SharedContext::mutex (previously we only had the shared one for everything), so my fix was wrong

Comment on lines 559 to 564
std::shared_ptr<AsynchronousInsertQueue> delete_async_insert_queue;
{
std::lock_guard lock(mutex);
delete_async_insert_queue = std::move(async_insert_queue);
}
delete_async_insert_queue.reset();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, and this is also wrong because other threads still can get a raw pointer from getAsynchronousInsertQueue() and continue using it after reset()

@tavplubix tavplubix force-pushed the fix_race_async_inserts_queue branch from c04fecb to 1913466 Compare March 19, 2024 20:07
@tavplubix tavplubix marked this pull request as ready for review March 20, 2024 12:44
@@ -218,7 +218,7 @@ AsynchronousInsertQueue::AsynchronousInsertQueue(ContextPtr context_, size_t poo
dump_by_first_update_threads.emplace_back([this, i] { processBatchDeadlines(i); });
}

AsynchronousInsertQueue::~AsynchronousInsertQueue()
void AsynchronousInsertQueue::flushAndShutdown()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please comment that an external entity (Context) is responsible for flushing the queue since it's not happening in the destructor anymore.

@tavplubix
Copy link
Member Author

AST fuzzer (msan) - #61771

@tavplubix tavplubix merged commit 9082a01 into master Mar 22, 2024
234 of 237 checks passed
@tavplubix tavplubix deleted the fix_race_async_inserts_queue branch March 22, 2024 15:06
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-not-for-changelog This PR should not be mentioned in the changelog pr-synced-to-cloud The PR is synced to the cloud repo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants