Commit Graph

130478 Commits

Author SHA1 Message Date
Alexey Milovidov
c729d06e27
Merge pull request #56078 from hanfei1991/hanfei/sqllogic
try to work sqllogic-test out
2023-12-05 06:37:29 +01:00
Alexey Milovidov
10d65a1ade
Merge pull request #55559 from azat/s3-fix-excessive-reads
Add ability to disable checksums for S3 to avoid excessive input file read
2023-12-05 06:34:21 +01:00
Alexey Milovidov
862171e3a2
Update Settings.h 2023-12-05 08:33:43 +03:00
Alexey Milovidov
c1af625ee8
Merge pull request #57313 from azat/tests/fuzzy-search-crash
Add regression test for skim (Rust) crash on pasting certain input
2023-12-05 06:25:11 +01:00
Alexey Milovidov
e1628731fd
Merge pull request #57489 from ClickHouse/nickitat-patch-15
Decrease default value for `filesystem_prefetch_min_bytes_for_single_read_task`
2023-12-05 06:14:24 +01:00
Alexey Milovidov
8603b4e92a
Update docs/en/sql-reference/aggregate-functions/parametric-functions.md
Co-authored-by: Johnny <9611008+johnnymatthews@users.noreply.github.com>
2023-12-05 08:12:47 +03:00
robot-ch-test-poll4
bd749b605b
Merge pull request #57493 from ClickHouse/evillique-patch-1
Fix docs
2023-12-05 06:02:29 +01:00
Nikolay Degterinsky
9b2cf06eb1
Fix docs 2023-12-05 05:14:19 +01:00
Han Fei
70f436483c address part of comments 2023-12-05 00:40:15 +01:00
Kseniia Sumarokova
ab80b2e8e2
Merge pull request #57482 from ClickHouse/cache-related-refactoring
Tiny refactoring around cache
2023-12-05 00:39:53 +01:00
Nikita Taranov
c4df0d0428
Decrease default value for filesystem_prefetch_min_bytes_for_single_read_task
Follow up #55841
2023-12-04 23:09:32 +01:00
Alexey Milovidov
38e83a9da9
Merge pull request #57481 from Algunenano/stop_reading_flaky
Fix flaky test 02697_stop_reading_on_first_cancel.sh
2023-12-04 23:07:24 +01:00
Johnny
ff746fb018
Grammar fixes. 2023-12-04 17:51:38 -04:00
Johnny
4d8084db31
Adds usage example for uniqUpTo.
A [user on Twitter](https://twitter.com/Dan_The_Goodman/status/1731453529078796740) pointed out that we didn't have a usage example here. This adds an example, and clarifies what `uniqUpTo` does.
2023-12-04 17:48:41 -04:00
Yakov Olkhovskiy
eb6a7684df add test 2023-12-04 20:20:35 +00:00
joelynch
f346667956
Simpler fix 2023-12-04 20:13:53 +01:00
joelynch
b312a9f4ee
bugfix: parse system stop listen tcp secure 2023-12-04 19:56:35 +01:00
kssenii
4a28f10c3d Minor cache changes 2023-12-04 19:02:37 +01:00
Nikolay Degterinsky
265e2b30a8
Even better 2023-12-04 18:42:25 +01:00
Raúl Marín
04842941f2 Shellcheck 2023-12-04 17:31:00 +00:00
Nikolay Degterinsky
947106972d
Better type check 2023-12-04 18:27:10 +01:00
Raúl Marín
617f068660 Fix flaky tests 2023-12-04 16:42:40 +00:00
Sergei Trifonov
c073d03a20
Merge pull request #57236 from ClickHouse/multiline-charts
Support multiple lines on dashboard charts
2023-12-04 17:35:31 +01:00
serxa
1c650f380a remove debug print 2023-12-04 16:26:39 +00:00
Alexey Milovidov
02439eee58
Merge pull request #49351 from ClickHouse/async-loader-integration
Asynchronous loading of tables
2023-12-04 17:16:12 +01:00
Nikita Mikhaylov
14c1c1b42a
Merge pull request #57419 from Algunenano/replication_lib
Add extra debug information on replication consistency errors
2023-12-04 16:57:35 +01:00
Azat Khuzhin
7986fe619a Introduce DistributedAsyncInsertionFailures - event for async INSERT failures
Useful for alerts

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-12-04 16:52:53 +01:00
Azat Khuzhin
604cec475a Fix possible distributed sends stuck due to "No such file or directory"
In case of restoring from current_batch.txt it is possible that the some
file from the batch will not be exist, and the fix submitted in #49884
was not complete, since it will fail later in markAsSend() (due to it
tries to obtain file size there):

    2023.12.04 05:43:12.676658 [ 5006 ] {} <Error> dist.DirectoryMonitor.work4: std::exception. Code: 1001, type: std::__1::__fs::filesystem::filesystem_error, e.what() = filesystem error: in file_size: No such file or directory ["/work4/clickhouse/data/dist/shard8_all_replicas//150426396.bin"], Stack trace (when copying this message, always include the lines below):

    0. ./.build/./contrib/llvm-project/libcxx/include/exception:134: std::runtime_error::runtime_error(String const&) @ 0x00000000177e83f4 in /usr/lib/debug/usr/bin/clickhouse.debug
    1. ./.build/./contrib/llvm-project/libcxx/include/string:1499: std::system_error::system_error(std::error_code, String const&) @ 0x00000000177f0fd5 in /usr/lib/debug/usr/bin/clickhouse.debug
    2. ./.build/./contrib/llvm-project/libcxx/include/__filesystem/filesystem_error.h:42: std::__fs::filesystem::filesystem_error::filesystem_error[abi:v15000](String const&, std::__fs::filesystem::path const&, std::error_code) @ 0x000000000b844ca1 in /usr/lib/debug/usr/bin/clickhouse.debug
    3. ./.build/./contrib/llvm-project/libcxx/include/__filesystem/filesystem_error.h:90: void std::__fs::filesystem::__throw_filesystem_error[abi:v15000]<String&, std::__fs::filesystem::path const&, std::error_code const&>(String&, std::__fs::filesystem::path const&, std::error_code const&) @ 0x000000001778f953 in /usr/lib/debug/usr/bin/clickhouse.debug
    4. ./.build/./contrib/llvm-project/libcxx/src/filesystem/filesystem_common.h:0: std::__fs::filesystem::detail::(anonymous namespace)::ErrorHandler<unsigned long>::report(std::error_code const&) const @ 0x0000000017793ef7 in /usr/lib/debug/usr/bin/clickhouse.debug
    5. ./.build/./contrib/llvm-project/libcxx/src/filesystem/operations.cpp:0: std::__fs::filesystem::__file_size(std::__fs::filesystem::path const&, std::error_code*) @ 0x0000000017793e26 in /usr/lib/debug/usr/bin/clickhouse.debug
    6. ./.build/./src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp:707: DB::DistributedAsyncInsertDirectoryQueue::markAsSend(String const&) @ 0x0000000011cd92c5 in /usr/lib/debug/usr/bin/clickhouse.debug
    7. ./.build/./contrib/llvm-project/libcxx/include/__iterator/wrap_iter.h💯 DB::DistributedAsyncInsertBatch::send() @ 0x0000000011cdd81c in /usr/lib/debug/usr/bin/clickhouse.debug
    8. ./.build/./src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp:0: DB::DistributedAsyncInsertDirectoryQueue::processFilesWithBatching() @ 0x0000000011cd5054 in /usr/lib/debug/usr/bin/clickhouse.debug
    9. ./.build/./src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp:417: DB::DistributedAsyncInsertDirectoryQueue::processFiles() @ 0x0000000011cd3440 in /usr/lib/debug/usr/bin/clickhouse.debug
    10. ./.build/./src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp:0: DB::DistributedAsyncInsertDirectoryQueue::run() @ 0x0000000011cd3878 in /usr/lib/debug/usr/bin/clickhouse.debug
    11. ./.build/./contrib/llvm-project/libcxx/include/__functional/function.h:0: DB::BackgroundSchedulePoolTaskInfo::execute() @ 0x00000000103dbc34 in /usr/lib/debug/usr/bin/clickhouse.debug
    12. ./.build/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:701: DB::BackgroundSchedulePool::threadFunction() @ 0x00000000103de1b6 in /usr/lib/debug/usr/bin/clickhouse.debug
    13. ./.build/./src/Core/BackgroundSchedulePool.cpp:0: void std::__function::__policy_invoker<void ()>::__call_impl<std::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<false>::ThreadFromGlobalPoolImpl<DB::BackgroundSchedulePool::BackgroundSchedulePool(unsigned long, StrongTypedef<unsigned long, CurrentMetrics::MetricTag>, StrongTypedef<unsigned long, CurrentMetrics::MetricTag>, char const*)::$_0>(DB::BackgroundSchedulePool::BackgroundSchedulePool(unsigned long, StrongTypedef<unsigned long, CurrentMetrics::MetricTag>, StrongTypedef<unsigned long, CurrentMetrics::MetricTag>, char const*)::$_0&&)::'lambda'(), void ()>>(std::__function::__policy_storage const*) @ 0x00000000103de7d1 in /usr/lib/debug/usr/bin/clickhouse.debug
    14. ./.build/./base/base/../base/wide_integer_impl.h:809: ThreadPoolImpl<std::thread>::worker(std::__list_iterator<std::thread, void*>) @ 0x000000000b8c5502 in /usr/lib/debug/usr/bin/clickhouse.debug
    15. ./.build/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:302: void* std::__thread_proxy[abi:v15000]<std::tuple<std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>, void ThreadPoolImpl<std::thread>::scheduleImpl<void>(std::function<void ()>, Priority, std::optional<unsigned long>, bool)::'lambda0'()>>(void*) @ 0x000000000b8c936e in /usr/lib/debug/usr/bin/clickhouse.debug
    16. ? @ 0x00007f1be8b30fd4 in ?
    17. ? @ 0x00007f1be8bb15bc in ?

And instead of ignoring errors, DistributedAsyncInsertBatch::valid() had
been added, that should be called when the files had been read from the
current_batch.txt, if it is not valid (some files from the batch did not
exist), then there is no sense in trying to send the same batch, so just
this file will be ignored, and files will be processed in a regular
order.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-12-04 16:52:53 +01:00
Azat Khuzhin
638d0102f8 Fix error_count in case of distributed_directory_monitor_max_sleep_time_ms>5min
In this case the error counter will be decremented everytime.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-12-04 16:52:53 +01:00
Robert Schulze
8db3bac7bd
Merge pull request #57442 from awakeljw/dev
Add `sqid()` function
2023-12-04 15:50:28 +01:00
Mikhail Koviazin
bef3fff731
Add support for read-only mode in ZooKeeper
This commit enables the read-only flag when connecting to the ZooKeeper server.

This flag is enabled by sending one extra byte when connecting,
and then receiving one extra byte during the first response.

In addition to that, we modify createIfNotExists to not complain
about attempting to alter a read-only ZooKeeper cluster if the node
already exists.

This makes ClickHouse more useful in the event of a loss of quorum,
user credentials are still accessible, which makes it possible to
connect to the cluster and run read queries.

Any DDL or DML query on a Distributed database or ReplicatedMergeTree
table will correctly fail, since it needs to write to ZooKeeper to
execute the query.

Any non-distributed query will be possible, which is ok since the
query was never replicated in the first place, there is no loss of
consistency.

Fixes #53749 as it seems to be the only thing 3.9 enforced.
2023-12-04 16:47:12 +02:00
vdimir
7e624ae911
Review fixes 2023-12-04 13:56:51 +00:00
vdimir
a4ae90de0d
Merge pull request #57275 from ClickHouse/vdimir/merge_task_tmp_data
Background merges correctly use temporary data storage in the cache
2023-12-04 14:52:20 +01:00
Kseniia Sumarokova
715ec0d334
Merge pull request #56383 from ClickHouse/fix-backup-restore-with-mv
Fix restore from backup with mat view and dropped source table
2023-12-04 13:25:13 +01:00
Igor Nikonov
434c2113d2 Fix style 2023-12-04 10:51:17 +00:00
vdimir
27589f5b0e
Enable temporary_data_in_cache in test_encrypted_disk 2023-12-04 10:34:17 +00:00
vdimir
b2e29d1416
Change type of s3_cache in test_encrypted_disk 2023-12-04 10:34:13 +00:00
Kseniia Sumarokova
4d3fde3624
Merge pull request #57424 from ClickHouse/fix-cache-background-download-queue-limit
fs cache: add limit for background download
2023-12-04 11:03:20 +01:00
kssenii
fd2c9dcc1a One more fix for bugfix check 2023-12-04 11:01:09 +01:00
Igor Nikonov
73ff984755 Remove select() usage 2023-12-04 09:33:34 +00:00
robot-ch-test-poll1
d63b652dae
Merge pull request #57385 from vitlibar/fix-inconsistent-metadata-for-backup-2
Stop using INCONSISTENT_METADATA_FOR_BACKUP that much
2023-12-04 10:29:57 +01:00
awakeljw
f264b63ea7 fix 02415_all_new_functions_must_be_documented 2023-12-04 17:26:59 +08:00
Azat Khuzhin
699d11628a Fix adjusting log_comment in case of multiple files passed
Previously, due to adjusting global_context and checking it as well, in
case of multiple files the log_comment will be adjusted only the first
time. Fix this by caching does user passed the log_comment explicitly or
not.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-12-04 10:02:24 +01:00
Yakov Olkhovskiy
b601b66146 don't exclude ephemeral column when pushing to view 2023-12-04 06:56:33 +00:00
awakeljw
6c70e32da1 rename squids to sqids 2023-12-04 11:26:55 +08:00
Bharat Nallan Chakravarthy
440dc66a5c Merge remote-tracking branch 'upstream/master' into ncb/hostname-system-log-tables 2023-12-03 15:19:47 -08:00
Vitaly Baranov
366095affc Fix test test_create_or_drop_tables_during_backup. 2023-12-04 00:15:31 +01:00
Vitaly Baranov
0457aba4a9 Show owner query ids in the message for the DEADLOCK_AVOIDED error. 2023-12-04 00:15:31 +01:00
Vitaly Baranov
44d6605b8a Fix RWLock inconsistency after write lock timeout. 2023-12-04 00:15:31 +01:00
Vitaly Baranov
fefbf397c0 Add more tests for RWLock. 2023-12-04 00:15:27 +01:00