ClickHouse/src
Azat Khuzhin 4efa847a1f Fix LOGICAL_ERROR on race between DROP and INSERT with materialized views
In case of parallel INSERT (max_insert_threads > 1) it is possible for
VIEW to be DROP/DETACH'ed while building pipeline for various paralell
streams, and in this case the header will not match since when you have
VIEW you will got empty header and non-empty header otherwise.

And this leads to LOGICAL_ERROR later, while checking that output
headers are the same (in QueryPipelineBuilder::addChains() -> Pipe::addChains()).

However it also makes the pipeline different for various parallel
streams, and it looks like it is better to fail in this case, so instead
of always returning empty header from buildChainImpl() explicit check
had been added.

Note, that I wasn't able to reproduce the issue with the added test,
but CI may have more "luck" (although I've verified it manually).

Fixes: #35902
Cc: @KochetovNicolai
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-08-05 13:16:32 +03:00
..
Access Fix clang-tidy in utils/examples 2022-07-29 11:36:51 +03:00
AggregateFunctions Merge pull request #39420 from amosbird/better-projection1-fix1 2022-08-04 03:06:55 +03:00
Backups Fix removing "internal" column. 2022-07-27 12:24:21 +02:00
Bridge
BridgeHelper Move some resources 2022-05-20 19:49:31 +00:00
Client fix redirecting of logs to stdout in client 2022-07-29 19:10:23 +00:00
Columns Merge pull request #39464 from CurtizJ/fix-custom-serializations 2022-08-05 00:55:41 +02:00
Common Merge pull request #39732 from HarryLeeIBM/hlee-s390x-unaligned 2022-08-05 07:24:57 +03:00
Compression Use std::popcount, ::countl_zero, ::countr_zero functions 2022-07-31 15:16:51 +00:00
Coordination Merge branch 'master' into keeper-create-snapshot-on-exit 2022-08-04 13:12:26 +00:00
Core Merge branch 'master' into use-dag-in-key-condition 2022-08-04 16:18:40 +02:00
Daemon Fix logs rotation issue 2022-07-25 13:58:04 +00:00
Databases Merge pull request #39337 from ClickHouse/minor_fix_for_ordinary_database 2022-07-19 13:30:56 +03:00
DataTypes Merge pull request #39464 from CurtizJ/fix-custom-serializations 2022-08-05 00:55:41 +02:00
Dictionaries Merge branch 'master' into tsan_clang_15 2022-08-02 13:00:55 +03:00
Disks Merge pull request #39872 from ClickHouse/store_cleanup_all_disks 2022-08-05 12:21:59 +03:00
Formats Merge remote-tracking branch 'upstream/master' into HEAD 2022-08-02 12:57:43 +00:00
Functions Merge branch 'master' into use-dag-in-key-condition 2022-08-04 16:18:40 +02:00
Interpreters Fix LOGICAL_ERROR on race between DROP and INSERT with materialized views 2022-08-05 13:16:32 +03:00
IO Merge branch 'master' into update-azure-lib 2022-08-03 23:00:57 +02:00
Loggers Fix logs rotation issue 2022-07-25 13:58:04 +00:00
Parsers Merge pull request #39758 from ClickHouse/tsan_clang_15 2022-08-04 01:56:52 +03:00
Processors Merge branch 'master' into use-dag-in-key-condition 2022-08-04 16:18:40 +02:00
QueryPipeline Review fixes. 2022-08-04 15:23:10 +00:00
Server slightly more readable if conditions 2022-08-04 18:04:06 +02:00
Storages Merge pull request #25563 from ClickHouse/use-dag-in-key-condition 2022-08-05 11:22:46 +02:00
TableFunctions add settings for executable table func 2022-07-30 20:02:56 +02:00
CMakeLists.txt Merge pull request #25563 from ClickHouse/use-dag-in-key-condition 2022-08-05 11:22:46 +02:00
configure_config.cmake merge 2022-07-16 19:05:07 +02:00
NOTICE