Commit Graph

125946 Commits

Author SHA1 Message Date
Konstantin Morozov
54edff684b add internal_replication 2023-10-09 10:32:22 +00:00
Maksim Kita
5d5db60aed Fixed code review issues 2023-10-09 13:23:16 +03:00
alesapin
89294c0765 Review fixes: make check consistent in all write functions 2023-10-09 12:06:35 +02:00
Azat Khuzhin
2ecd9ddabd Fix leak in StorageHDFS
LSan report:

    Direct leak of 400 byte(s) in 5 object(s) allocated from:
        0 0x564c44d5308d in operator new[](unsigned long) (/usr/bin/clickhouse+0xbdf908d) (BuildId: 9bd2befe9c5f1d960238405d4a3fc9860273b81a)
        1 0x564c7b1b83f2 in hdfsGetPathInfo build_docker/./contrib/libhdfs3/src/client/Hdfs.cpp:1096:18
        2 0x564c670a8fed in DB::HDFSSource::URISIterator::Impl::next() build_docker/./src/Storages/HDFS/StorageHDFS.cpp:471:25
        3 0x564c670a54e9 in DB::HDFSSource::URISIterator::next() build_docker/./src/Storages/HDFS/StorageHDFS.cpp:510:19

CI: https://s3.amazonaws.com/clickhouse-test-reports/55261/de503f75dcbc5a4d0e7fbb2e6b08c2106d62848a/integration_tests__asan__[3_6].html
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-10-09 10:46:00 +02:00
Aleksandr Musorin
8d0c961af0 Allow drop cache for protobuf format
Before it was impossible to update Protobuf schema without server
restart. With this commit, it is enough to send query `SYSTEM DROP
SCHEMA FORMAT CACHE [FOR Protobuf]`.
2023-10-09 10:41:15 +02:00
Robert Schulze
878e36df5b
Fix spelling 2023-10-09 07:41:23 +00:00
Derek Chia
f787186ba8
Update replacingmergetree.md
Added example for ReplacingMergeTree with is_deleted parameter
2023-10-09 15:16:24 +08:00
Jordi Villar
95669d5f48 Improve secondary index mark cache documentation 2023-10-09 08:23:44 +02:00
Azat Khuzhin
aae3ebfa5e Mark test_build_sets_from_multiple_threads/test.py::test_set as broken in analyzer
It does not handle max_execution_time under analyzer.

CI: https://s3.amazonaws.com/clickhouse-test-reports/55338/dee435f8f475f067a7a51ce11f71e595fc27b177/integration_tests__asan__analyzer__[2_6]/integration_run_parallel0_0.log
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-10-09 07:02:39 +02:00
Azat Khuzhin
9f82eef1b6 Fix test_max_rows_to_read_leaf_with_view flakiness (due to prefer_localhost_replica)
CI: https://s3.amazonaws.com/clickhouse-test-reports/0/186bd9c85974f641a70581a704a43ebdb6d302a8/integration_tests__asan__analyzer__[4_6]/integration_run_parallel1_0.log
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-10-09 06:56:53 +02:00
Azat Khuzhin
88d28c1135 Add a note about instability of max_rows_to_read_leaf
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-10-09 06:56:53 +02:00
Alexey Milovidov
0fa4d114bf Update test 2023-10-09 03:28:37 +02:00
Alexey Milovidov
e13c279efd Merging #43085 2023-10-09 03:22:32 +02:00
Alexey Milovidov
fac83efdd2
Merge pull request #55335 from azat/fix-sort-sigsegv
Fix SIGSEGV in MergeSortingPartialResultTransform (due to zero chunks after remerge())
2023-10-09 02:48:12 +02:00
Alexey Milovidov
b619d07baf
Merge pull request #55353 from ClickHouse/fix-garbage-2
Fix trash optimization (up to a certain extent)
2023-10-09 02:42:56 +02:00
Alexey Milovidov
808b78984f
Merge pull request #55356 from ClickHouse/better-exception-messages
Better exception messages
2023-10-09 02:42:26 +02:00
Alexey Milovidov
d6aa3cdb4c
Merge pull request #55357 from ClickHouse/revert-54477-view-sampling
Revert "Support SAMPLE BY for VIEW"
2023-10-09 02:41:55 +02:00
Alexey Milovidov
1c473c03d9
Update 02346_inverted_index_mutation.sql 2023-10-09 02:34:04 +03:00
Alexey Milovidov
885e07cd0b
Update MutateTask.cpp 2023-10-09 02:33:46 +03:00
Alexey Milovidov
831969abf9
Merge pull request #55354 from ClickHouse/fix-bad-test-5
Fix bad test `01605_dictinct_two_level`
2023-10-09 01:21:43 +02:00
Alexey Milovidov
75a4d55afd
Merge pull request #55328 from ClickHouse/better-docs-55326
Better docs for #55326
2023-10-09 01:10:53 +02:00
Alexey Milovidov
8ac56a7b9f Remove old test 2023-10-09 01:09:03 +02:00
Alexey Milovidov
e3771f10d2 Merge branch 'master' into remove-in-memory-data-parts 2023-10-09 01:08:20 +02:00
Alexey Milovidov
2f8ca43e33
Merge pull request #55359 from ClickHouse/alexey-milovidov-patch-7
Update CHANGELOG.md
2023-10-09 01:05:38 +02:00
Alexey Milovidov
b3c72baede
Update CHANGELOG.md 2023-10-09 02:05:21 +03:00
Alexey Milovidov
eac4e3e915 Add a test 2023-10-08 23:17:40 +02:00
Alexey Milovidov
e1dc80b5ab
Revert "Support SAMPLE BY for VIEW" 2023-10-09 00:08:46 +03:00
Alexey Milovidov
2aaddcce18 Better exception messages 2023-10-08 22:54:33 +02:00
Alexey Milovidov
61caa9a660
Merge pull request #55245 from azat/bump-minio
Upgrade MinIO to support accepting non signed requests
2023-10-08 22:46:01 +02:00
Robert Schulze
0e1aed2a38
Merge pull request #55327 from rschu1ze/to_start_of_interval_hours
Refactorings and better documentation for `toStartOfInterval()`
2023-10-08 22:33:12 +02:00
Robert Schulze
07e0cc196d
Some fixups 2023-10-08 20:27:13 +00:00
Azat Khuzhin
56dbba1f95 Fix SIGSEGV in MergeSortingPartialResultTransform (due to zero chunks after remerge())
It is possible to have non zero input chunks before remerge() and zero
after:

    2023.10.08 10:21:20.944928 [ 4321 ] {427df456-1400-4fbe-8bd7-c4de139f00ca} <Debug> MergeSortingTransform: Re-merging intermediate ORDER BY data (1 blocks with 0 rows) to save memory consumption
    2023.10.08 10:36:16.447001 [ 14466 ] {} <Fatal> BaseDaemon: (version 23.10.1.1, build id: 3E53B6B3A53FD562F44C88703BD88EB713881A44, git hash: 5ddfb170a1096cf88664b1a4b9b7bd2e7ef36c29) (from thread 4321) (query_id: 427df456-1400-4fbe-8bd7-c4de139f00ca) (query: SELECT CounterID FROM test.visits ARRAY JOIN Goals.ID WHERE CounterID = 942285 ORDER BY CounterID

CI: https://s3.amazonaws.com/clickhouse-test-reports/55276/099665478df3e77d1df0332dd705ca7209e903af/stress_test__debug_.html
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-10-08 22:21:01 +02:00
Alexey Milovidov
12714d54b2 Fix bad test 01605_dictinct_two_level 2023-10-08 22:06:30 +02:00
Alexey Milovidov
0b939fae5d Fix bad test 2023-10-08 22:01:15 +02:00
Alexey Milovidov
6e60e720d9 Add a test 2023-10-08 21:54:46 +02:00
Alexey Milovidov
ca7bf062e0 Fix garbage 2023-10-08 21:53:26 +02:00
Azat Khuzhin
dee435f8f4 Add a test for data-race in CreatingSetsTransform
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-10-08 21:45:44 +02:00
Alexey Milovidov
fa54b21424
Merge pull request #55103 from ClickHouse/fix_shell_command_abort
Proper cleanup in case of exception in ctor of ShellCommandSource
2023-10-08 21:36:28 +02:00
Alexey Milovidov
8ae8371260
Merge pull request #55336 from ClickHouse/revert-51946
Review #51946 and partially revert it
2023-10-08 21:27:02 +02:00
Robert Schulze
d4e7fa2542
Merge pull request #55123 from garcher22/untuple
Use the tuple element names as column names in `untuple()`
2023-10-08 20:14:29 +02:00
Maksim Kita
f0643a2311 Context locks small fixes 2023-10-08 19:55:45 +03:00
Robert Schulze
2848548c63
Merge remote-tracking branch 'rschu1ze/master' into arrayFold 2023-10-08 16:32:36 +00:00
Robert Schulze
0f7ca6149b
(Hopefully) fix clang-tidy 2023-10-08 16:30:02 +00:00
Robert Schulze
32a77ca1eb
Merge pull request #54391 from itayisraelov/israelov/generate-random-int-array
Add function `arrayRandomSample()`
2023-10-08 18:28:58 +02:00
Alexey Milovidov
972f3678fa Review #51946 and partially revert it 2023-10-08 18:00:59 +02:00
Alexey Milovidov
9ac7cfc026
Merge pull request #55339 from ClickHouse/tylerhannan-patch-1
Update README.md
2023-10-08 17:43:14 +02:00
Tyler Hannan
76345a5f60
Update README.md
Updating meetups
2023-10-08 17:42:15 +02:00
Sema Checherinda
bfabeaf474
Merge pull request #55218 from CheSema/metadata-version-is-fixed
remove the blocker to grow the metadata file version
2023-10-08 17:35:34 +02:00
Azat Khuzhin
cd3c140dd6 Fix data-race in CreatingSetsTransform (on errors) due to throwing shared exception
WARNING: ThreadSanitizer: data race (pid=3436)
  Read of size 1 at 0x7b50001b07a7 by thread T187:
    0 std::__1::basic_string<>::__is_long[abi:v15000] const build_docker/./contrib/llvm-project/libcxx/include/string:1499:33 (clickhouse-tsan+0x1faa29ff) (BuildId: f978f51991d62a36512b8fc6952335a82292896f)
    1 std::__1::basic_string<>::size[abi:v15000]() const build_docker/./contrib/llvm-project/libcxx/include/string:968:17 (clickhouse-tsan+0x1faa29ff)
    2 std::__1::basic_string<>::empty[abi:v15000]() const build_docker/./contrib/llvm-project/libcxx/include/string:996:42 (clickhouse-tsan+0x1faa29ff)
    3 Poco::Exception::extendedMessage() build_docker/./base/poco/Foundation/src/Exception.cpp:114:13 (clickhouse-tsan+0x1faa29ff)
    4 DB::Exception::addMessage() <null> (clickhouse-tsan+0x7e0d5f1) (BuildId: f978f51991d62a36512b8fc6952335a82292896f)
    5 DB::executeJob(DB::ExecutingGraph::Node*, DB::ReadProgressCallback*) build_docker/./src/Processors/Executors/ExecutionThreadContext.cpp:70:23 (clickhouse-tsan+0x1b3f2fed) (BuildId: f978f51991d62a36512b8fc6952335a82292896f)
    6 DB::ExecutionThreadContext::executeTask() build_docker/./src/Processors/Executors/ExecutionThreadContext.cpp:95:9 (clickhouse-tsan+0x1b3f2fed)
    7 DB::PipelineExecutor::executeStepImpl(unsigned long, std::__1::atomic<bool>*) build_docker/./src/Processors/Executors/PipelineExecutor.cpp:273:26 (clickhouse-tsan+0x1b3e5a10) (BuildId: f978f51991d62a36512b8fc6952335a82292896f)
    8 DB::PipelineExecutor::executeSingleThread(unsigned long) build_docker/./src/Processors/Executors/PipelineExecutor.cpp:239:5 (clickhouse-tsan+0x1b3e4bb8) (BuildId: f978f51991d62a36512b8fc6952335a82292896f)
    9 DB::PipelineExecutor::executeImpl(unsigned long, bool) build_docker/./src/Processors/Executors/PipelineExecutor.cpp:399:9 (clickhouse-tsan+0x1b3e4bb8)
    10 DB::PipelineExecutor::execute(unsigned long, bool) build_docker/./src/Processors/Executors/PipelineExecutor.cpp:111:9 (clickhouse-tsan+0x1b3e48be) (BuildId: f978f51991d62a36512b8fc6952335a82292896f)
    11 DB::CompletedPipelineExecutor::execute() build_docker/./src/Processors/Executors/CompletedPipelineExecutor.cpp:110:18 (clickhouse-tsan+0x1b3e31c8) (BuildId: f978f51991d62a36512b8fc6952335a82292896f)
    12 DB::FutureSetFromSubquery::buildOrderedSetInplace(std::__1::shared_ptr<DB::Context const> const&) build_docker/./src/Interpreters/PreparedSets.cpp:202:14 (clickhouse-tsan+0x19a58396) (BuildId: f978f51991d62a36512b8fc6952335a82292896f)

  Previous write of size 8 at 0x7b50001b07a0 by thread T192:
    0 std::__1::basic_string<>::__set_long_cap[abi:v15000](unsigned long) build_docker/./contrib/llvm-project/libcxx/include/string:1592:37 (clickhouse-tsan+0x238809e2) (BuildId: f978f51991d62a36512b8fc6952335a82292896f)
    1 std::__1::basic_string<>::__grow_by_and_replace(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, char const*) build_docker/./contrib/llvm-project/libcxx/include/string:2367:5 (clickhouse-tsan+0x238809e2)
    2 std::__1::basic_string<>::append(char const*, unsigned long) build_docker/./contrib/llvm-project/libcxx/include/string:2692:9 (clickhouse-tsan+0x238809e2)
    3 std::__1::basic_string<>::append(char const*) build_docker/./contrib/llvm-project/libcxx/include/string:2849:12 (clickhouse-tsan+0x1faa2a58) (BuildId: f978f51991d62a36512b8fc6952335a82292896f)
    4 Poco::Exception::extendedMessage() build_docker/./base/poco/Foundation/src/Exception.cpp:114:27 (clickhouse-tsan+0x1faa2a58)
    5 DB::Exception::addMessage() <null> (clickhouse-tsan+0x7e0d5f1) (BuildId: f978f51991d62a36512b8fc6952335a82292896f)
    6 DB::executeJob(DB::ExecutingGraph::Node*, DB::ReadProgressCallback*) build_docker/./src/Processors/Executors/ExecutionThreadContext.cpp:70:23 (clickhouse-tsan+0x1b3f2fed) (BuildId: f978f51991d62a36512b8fc6952335a82292896f)
    7 DB::ExecutionThreadContext::executeTask() build_docker/./src/Processors/Executors/ExecutionThreadContext.cpp:95:9 (clickhouse-tsan+0x1b3f2fed)
    8 DB::PipelineExecutor::executeStepImpl(unsigned long, std::__1::atomic<bool>*) build_docker/./src/Processors/Executors/PipelineExecutor.cpp:273:26 (clickhouse-tsan+0x1b3e5a10) (BuildId: f978f51991d62a36512b8fc6952335a82292896f)
    9 DB::PipelineExecutor::executeSingleThread(unsigned long) build_docker/./src/Processors/Executors/PipelineExecutor.cpp:239:5 (clickhouse-tsan+0x1b3e4bb8) (BuildId: f978f51991d62a36512b8fc6952335a82292896f)
    10 DB::PipelineExecutor::executeImpl(unsigned long, bool) build_docker/./src/Processors/Executors/PipelineExecutor.cpp:399:9 (clickhouse-tsan+0x1b3e4bb8)
    11 DB::PipelineExecutor::execute(unsigned long, bool) build_docker/./src/Processors/Executors/PipelineExecutor.cpp:111:9 (clickhouse-tsan+0x1b3e48be) (BuildId: f978f51991d62a36512b8fc6952335a82292896f)
    12 DB::CompletedPipelineExecutor::execute() build_docker/./src/Processors/Executors/CompletedPipelineExecutor.cpp:110:18 (clickhouse-tsan+0x1b3e31c8) (BuildId: f978f51991d62a36512b8fc6952335a82292896f)
    13 DB::FutureSetFromSubquery::buildOrderedSetInplace(std::__1::shared_ptr<DB::Context const> const&) build_docker/./src/Interpreters/PreparedSets.cpp:202:14 (clickhouse-tsan+0x19a58396) (BuildId: f978f51991d62a36512b8fc6952335a82292896f)

  Location is heap block of size 480 at 0x7b50001b0600 allocated by thread T193:
    0 posix_memalign <null> (clickhouse-tsan+0x7d6ac85) (BuildId: f978f51991d62a36512b8fc6952335a82292896f)
    1 std::__1::__libcpp_aligned_alloc[abi:v15000](unsigned long, unsigned long) build_docker/./contrib/llvm-project/libcxxabi/../libcxx/include/new:328:9 (clickhouse-tsan+0x238b5a05) (BuildId: f978f51991d62a36512b8fc6952335a82292896f)
    2 __cxxabiv1::__aligned_malloc_with_fallback(unsigned long) build_docker/./contrib/llvm-project/libcxxabi/src/fallback_malloc.cpp:215:20 (clickhouse-tsan+0x238b5a05)
    3 __cxa_allocate_exception build_docker/./contrib/llvm-project/libcxxabi/src/cxa_exception.cpp:190:17 (clickhouse-tsan+0x238b31e5) (BuildId: f978f51991d62a36512b8fc6952335a82292896f)
    4 std::exception_ptr std::make_exception_ptr[abi:v15000]<DB::Exception>(DB::Exception) build_docker/./contrib/llvm-project/libcxx/include/exception:206:9 (clickhouse-tsan+0x144bfa8a) (BuildId: f978f51991d62a36512b8fc6952335a82292896f)
    5 DB::CreatingSetsTransform::~CreatingSetsTransform() build_docker/./src/Processors/Transforms/CreatingSetsTransform.cpp:30:45 (clickhouse-tsan+0x1b7603c3) (BuildId: f978f51991d62a36512b8fc6952335a82292896f)
    ...
    35 DB::FutureSetFromSubquery::buildOrderedSetInplace(std::__1::shared_ptr<DB::Context const> const&) build_docker/./src/Interpreters/PreparedSets.cpp:211:1 (clickhouse-tsan+0x19a58608) (BuildId: f978f51991d62a36512b8fc6952335a82292896f)
2023-10-08 17:16:39 +02:00
Robert Schulze
38c64b3cd1
Fix tests 2023-10-08 14:26:31 +00:00