Commit Graph

138946 Commits

Author SHA1 Message Date
shabroo
8e8bc83d36
Update Context.cpp
@alexey-milovidov please stop torturing me and accept this commit.
2024-03-26 17:37:27 +01:00
Nikita Mikhaylov
1b828ab6f6 Fix for ASync 2024-03-26 16:05:43 +00:00
Austin Kothig
c15993220f
Merge remote-tracking branch 'upstream' into feature/dateDiff-nanoseconds 2024-03-26 09:04:23 -07:00
avogar
98f99db6b2 Remove unneded change 2024-03-26 16:01:56 +00:00
Yarik Briukhovetskyi
d8bfdf040f
has_all -> has_all_tables 2024-03-26 16:58:36 +01:00
Max Kainov
e4d9a74057 CI: create CIOptions class to handle ci user config
CI: create CIOptions class to handle ci user config
2024-03-26 15:39:07 +00:00
jsc0218
0eb12d2d27
Merge pull request #61888 from jsc0218/No_milli_micro_nanosecod_in_date_trunc
no smaller unit in date_trunc
2024-03-26 11:15:35 -04:00
Kseniia Sumarokova
63dceeb701
Merge pull request #61932 from ClickHouse/fix-flaky-test-broke-projections
Fix flaky test_broken_projestions/test.py::test_broken_ignored_replic…
2024-03-26 16:09:39 +01:00
Kruglov Pavel
837b89b8fe
Fix settings names 2024-03-26 16:08:19 +01:00
Kseniia Sumarokova
c21c67f9f5
Merge pull request #61885 from ClickHouse/kssenii-patch-9
Update create.sql
2024-03-26 16:08:16 +01:00
Kruglov Pavel
c5f6296b43
Try to fix links in ru docs 2024-03-26 16:07:15 +01:00
Kruglov Pavel
50e667dd5b
Merge pull request #61667 from Avogar/fix-with-fill-invalid-chunk
Don't allow the same expression in ORDER BY with and without WITH FILL
2024-03-26 16:04:33 +01:00
jsc0218
1f0938f669 add a test 2024-03-26 14:38:51 +00:00
Vitaly Baranov
83e006e372
Merge pull request #61734 from vitlibar/fix-columns-after-alter-table-modify-query
Fix columns after executing MODIFY QUERY for a materialized view with internal table
2024-03-26 15:35:22 +01:00
Kruglov Pavel
7220797637
Fix style 2024-03-26 15:26:42 +01:00
Azat Khuzhin
e926253664 Check is Rust avaiable for build, if not, suggest a way to disable Rust support
Rust requires internet connection, so let's detect if it works, and if
not, suggest building with -DENABLE_RUST=OFF, here is an example of the
output in case of error:

    $ docker run --network=none ...
    -- Copy skim to /root/rust/skim
    CMake Error at rust/CMakeLists.txt:112 (message):
      Rust (/rust/rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo)
      support is not available (likely there is no internet connectivity):

          Updating git repository `https://github.com/azat-rust/tuikit.git`

      warning: spurious network error (3 tries remaining): failed to resolve
      address for github.com: Temporary failure in name resolution; class=Net
      (12)

      warning: spurious network error (2 tries remaining): failed to resolve
      address for github.com: Temporary failure in name resolution; class=Net
      (12)

      warning: spurious network error (1 tries remaining): failed to resolve
      address for github.com: Temporary failure in name resolution; class=Net
      (12)

      error: failed to load source for dependency `tuikit`

      Caused by:

        Unable to update https://github.com/azat-rust/tuikit.git?rev=e1994c0e03ff02c49cf1471f0cc3cbf185ce0104

      Caused by:

        failed to clone into: /rust/cargo/git/db/tuikit-c3ca927b4dbcf00d

      Caused by:

        network failure seems to have happened
        if a proxy or similar is necessary `net.git-fetch-with-cli` may help here
        https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli

      Caused by:

        failed to resolve address for github.com: Temporary failure in name resolution; class=Net (12)

      You can disable Rust support with -DENABLE_RUST=OFF
    Call Stack (most recent call first):
      rust/CMakeLists.txt:129 (add_rust_subdirectory)

    -- Configuring incomplete, errors occurred!

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 15:20:49 +01:00
Han Fei
73deb9a24c fix a race in refreshable view 2024-03-26 14:20:54 +01:00
János Benjamin Antal
c7775a10ea
Do not run the test with SharedMergeTree 2024-03-26 13:39:54 +01:00
Nikolai Kochetov
2dee605d52 Merge branch 'master' into gb-use-null-analyzer-crashes 2024-03-26 13:05:03 +01:00
Nikolai Kochetov
277df60dc4 Fix some crashes with analyzer and group_by_use_nulls. 2024-03-26 12:01:17 +00:00
Alexander Gololobov
4e94510e32 Finish chunk if the size exceeds max_block_size 2024-03-26 12:49:19 +01:00
Alexander Gololobov
2bf1d118c7 Stream rows when reading from system.replicas 2024-03-26 12:49:19 +01:00
kssenii
14c60dea8e Fix flaky test_broken_projestions/test.py::test_broken_ignored_replicated 2024-03-26 12:19:30 +01:00
Igor Nikonov
c89e87b99d Merge remote-tracking branch 'origin/master' into test-tuple-elimination-pass-analyzer 2024-03-26 11:13:40 +00:00
János Benjamin Antal
d0240e59ff Document the setting. 2024-03-26 11:13:08 +00:00
János Benjamin Antal
1ec7258d1e Enable allow_suspicious_primary_key for perf tests that need it 2024-03-26 11:09:03 +00:00
Arthur Passos
2ed53e309b
Reset part level upon attach from disk on MergeTree (#61536)
* hackish change to check how CI reacts

* remove unnecessary renameTo

* introduce separate metho

* remove unused arg

* rename meth od

* add simple test

* add current database

* set mutations sync

* Update tests/queries/0_stateless/03013_test_part_level_is_reset_attach_from_disk_mt.sql

---------

Co-authored-by: János Benjamin Antal <antaljanosbenjamin@users.noreply.github.com>
Co-authored-by: János Benjamin Antal <benjamin.antal@clickhouse.com>
2024-03-26 11:44:55 +01:00
Azat Khuzhin
4eafb86535 Do not use default (removed) cluster in 02980_dist_insert_readonly_replica
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:35:32 +01:00
Azat Khuzhin
05792ee9ca Make 02980_dist_insert_readonly_replica test more stable (by using round_robin LB)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:34:43 +01:00
Azat Khuzhin
0900c4af60 Add comments for 02980_dist_insert_readonly_replica
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:31:48 +01:00
Azat Khuzhin
3481fd5191 Fix settings history for distributed_insert_skip_read_only_replicas
CI: https://s3.amazonaws.com/clickhouse-test-reports/59176/fa0c47a42f4187e8284e19d1cd008a0a76c38caf/fast_test.html
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:25:28 +01:00
Azat Khuzhin
a90d64abf3 Cleanup test
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:24:59 +01:00
Azat Khuzhin
1bb9cffb9b Remove distributed_insert_skip_read_only_replicas from settings history
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:24:59 +01:00
Azat Khuzhin
f86bb1e9e9 Rename to DistributedConnectionSkipReadOnlyReplica
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:24:59 +01:00
Azat Khuzhin
ac882c1e70 Simplify condition in PoolWithFailoverBase
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:24:59 +01:00
Azat Khuzhin
c7b919b19e Replace distributed_insert_replicas_preferences with distributed_insert_skip_read_only_replicas
v2: fix test
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:24:57 +01:00
Azat Khuzhin
63f92b2c16 Add documentation for distributed_insert_replicas_preferences
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:24:16 +01:00
Azat Khuzhin
a19b27bd7c Revert extra changed lines
That was the changes that looks OK for the initial patchset version, but
not now, after all review comments.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:24:16 +01:00
Azat Khuzhin
fe613ddd06 Convert distributed_insert_replicas_preferences into enum
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:24:14 +01:00
Azat Khuzhin
eb334d717a Remove superior check for empty pools
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:23:21 +01:00
Azat Khuzhin
dbdf080108 Remove insert argument for ConnectionPoolWithFailover
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:22:38 +01:00
Azat Khuzhin
d922bfb1b0 Introduce distributed_insert_prefer_non_readonly_replica setting
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:21:40 +01:00
Azat Khuzhin
0e99781686 Move insert flag from ConnectionEstablisher to TryResult
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:21:40 +01:00
Azat Khuzhin
a3c3bff5df tests: cover filtering out read-only replicas during INSERT into Distributed
v2: replace without s3_plain disk
v3: add check for DistributedConnectionReadOnlyReplica
v4: set insert_keeper_max_retries=0
v5: do not set insert_keeper_max_retries=0
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:21:40 +01:00
Azat Khuzhin
5b872aba7b tests: adjust 02537_distributed_loosing_files_after_exception
Now, since there is connection probing, the error changed from
UNKNOWN_TABLE to ALL_CONNECTION_TRIES_FAILED, though I'm not sure that
this good...

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:21:39 +01:00
Azat Khuzhin
b9469e2729 Do not try to INSERT into readonly replicas for Distributed engine
Sometimes replica may be readonly for a long time, and this will make
some INSERT queries fail, but it does not make sense to INSERT into
readonly replica, so let's ignore them.

But note, that this will require to extend TableStatus (not extend, but
introduce new version), that will have is_readonly field.

Also before background INSERT into Distributed does not uses
getManyChecked() which means that they do not request TableStatus
packet, while now they would, though this is minor (just a note).

v2: Add a note about max_replica_delay_for_distributed_queries for INSERT
v3: Skip read-only replicas for async INSERT into Distributed
v4: Remove extra @insert parameter for ConnectionPool*::get*
    It make sense only when the table name had passed --
    ConnectionPoolWithFailover::getManyChecked()
v5: rebase on top LoggerPtr
v6: rebase
v7: rebase
v8: move TryResult::is_readonly into the end

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:21:38 +01:00
Azat Khuzhin
77de81f996 Simpler and less error prone PoolWithFailoverBase::TryResult::reset()
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:19:10 +01:00
Azat Khuzhin
b2945a5ad4 Mark Replicated table as readonly in case of static disk (read-only/write-once)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-26 11:19:10 +01:00
Nikolai Kochetov
2f382ac8a8
Merge pull request #61787 from ClickHouse/fix-virtual-columns-storage-merge-analyzer
Fix more tests with virtual columns in StorageMerge.
2024-03-26 11:16:25 +01:00
Nikolai Kochetov
f2e9ea2417
Merge pull request #61875 from ClickHouse/try-to-fix-02901_parallel_replicas_rollup-with-analyzer
Try to fix 02901_parallel_replicas_rollup with analyzer.
2024-03-26 11:12:29 +01:00