Commit Graph

1657 Commits

Author SHA1 Message Date
Robert Schulze
113bb00005
Fix clang-tidy "-readability-redundant-inline-specifier" 2024-05-19 10:23:58 +00:00
Robert Schulze
2909e6451b
Move StringUtils.h/cpp back to Common/ 2024-05-19 09:39:36 +00:00
Alexey Milovidov
bd9709adee
Merge pull request #64022 from ClickHouse/fix-analyzer
Fix a typo in Analyzer
2024-05-17 20:02:13 +02:00
yariks5s
8d235a4a39 remove trash from the code 2024-05-17 15:11:21 +00:00
Anton Ivashkin
f01386fc79 Fix non-SSL build 4 2024-05-17 16:36:55 +02:00
Anton Ivashkin
f4afaf7f18 Fix non-SSL build 3 2024-05-17 16:16:54 +02:00
Anton Ivashkin
72285615cb Fix non-SSL build 2 2024-05-17 15:33:14 +02:00
Anton Ivashkin
222dbe30d8 Fix non-SSL build 2024-05-17 15:06:50 +02:00
Anton Ivashkin
183223b7ba Fix tabs instead of spaces 2024-05-17 14:53:54 +02:00
Anton Ivashkin
20b23b0ff9 Fix variable name style 2024-05-17 14:28:40 +02:00
Alexey Milovidov
26501178e6 Fix analyzer 2024-05-17 10:23:32 +02:00
yariks5s
fed6c65858 add setting to enable planning 2024-05-16 17:57:01 +00:00
Anton Ivashkin
92df0f9737 More parameters for tls layer in protocols 2024-05-16 18:34:17 +02:00
Azat Khuzhin
49a52cdb3f Remove http_max_chunk_size setting (too internal)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-05-16 18:33:43 +02:00
kssenii
9ce465bb88 Merge remote-tracking branch 'origin/master' into use-iobject-storage-for-table-engines-1 2024-05-13 16:14:58 +02:00
yariks5s
a66a81efa3 merge 2024-05-10 11:21:40 +00:00
Alexey Milovidov
a05fccf8cc Useless changes 2024-05-10 07:30:40 +02:00
Alexey Milovidov
a6543a1c48 Useless changes 2024-05-10 05:07:37 +02:00
Alexey Milovidov
426a51b624 Useless changes 2024-05-10 04:53:29 +02:00
Alexey Milovidov
1d69518c4d Useless changes 2024-05-09 02:07:04 +02:00
yariks5s
e1ed0af3d2 Added pointer check, Chunk as argument to PlanSquashingTransform, fully refactored names of functions 2024-05-08 14:28:09 +00:00
kssenii
e9d9f2bc25 Merge remote-tracking branch 'origin/master' into use-iobject-storage-for-table-engines-1 2024-05-03 13:55:12 +02:00
Konstantin Bogdanov
273464c963
Merge pull request #63046 from ClickHouse/support-user-expiration
Check user expiration date before query execution
2024-04-30 17:42:58 +00:00
Konstantin Bogdanov
fccb463222
Rename 2024-04-30 16:07:51 +02:00
Konstantin Bogdanov
36014f739a
Rename 2024-04-30 14:52:43 +02:00
Nikita Taranov
8fd38f2abc
Merge pull request #62752 from ClickHouse/log_profile_events_send_timings
Log profile events send timings
2024-04-29 15:41:28 +00:00
kssenii
7a416f2e76 Merge remote-tracking branch 'origin/master' into use-iobject-storage-for-table-engines-1 2024-04-28 12:19:32 +02:00
Azat Khuzhin
cf1451ecde Fix possible CHECKSUM_DOESNT_MATCH during replicated fetches
Previously HTTP server does not tries to send exception if something had
been written to the client already, but after rewriting to "zero-copy"
HTTP implementation (back in #19516) this got broken, and you can get
pretty "dangerous" at least at first glance errors, like:
- Malformed chunked encoding
- or most likely to CHECKSUM_DOESNT_MATCH error

This is not crucial because it will never pass checksum checks, but
still icky. So let's fix it.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-04-28 07:34:08 +02:00
Alexey Milovidov
58792a1935
Merge pull request #60302 from azat/INSERT-receive-timeout
Change back how receive_timeout is handled for INSERTs
2024-04-27 14:55:28 +00:00
Konstantin Bogdanov
64de52397e
Merge pull request #62978 from ClickHouse/fix-grpc-ipv6-crash
gRPC: fix crash on IPv6 peer connection
2024-04-27 06:22:41 +00:00
Konstantin Bogdanov
822a57cb83
Fix integration tests 2024-04-26 19:56:24 +02:00
Konstantin Bogdanov
6d805d094c
Fix harder 2024-04-26 19:37:14 +02:00
kssenii
91014456b5 Merge remote-tracking branch 'origin/master' into use-iobject-storage-for-table-engines-1 2024-04-26 19:24:07 +02:00
Konstantin Bogdanov
4c607147ba
Fix 2024-04-26 17:38:02 +02:00
Konstantin Bogdanov
466633729f
Support user expiration 2024-04-26 17:03:40 +02:00
Konstantin Bogdanov
07e4e7fa73
Check for protocol prefix 2024-04-26 16:45:30 +02:00
Konstantin Bogdanov
7326e2a0fa
Fix aborting on IPv6 peer address 2024-04-25 16:44:16 +02:00
kssenii
730995f2a4 Review suggestion 2024-04-22 13:44:36 +01:00
kssenii
4a68b2a877 Allow quota key with different auth scheme 2024-04-22 13:19:59 +01:00
Alexander Gololobov
25cfd48f87
Only log if it took longer than 100 ms 2024-04-18 14:39:23 +01:00
Alexander Gololobov
01b80e754a Log profile events send timings 2024-04-18 11:37:09 +01:00
Vitaly Baranov
d12608f366
Merge pull request #62669 from slvrtrn/http-interface-role-query-param
Add `role` query parameter to the HTTP interface
2024-04-17 16:39:49 +00:00
slvrtrn
0718a31921 Add NameValueCollection::getAll method 2024-04-16 18:50:39 +02:00
slvrtrn
fd81810b9c Use SET_NON_GRANTED_ROLE error code instead of ACCESS_DENIED 2024-04-16 17:14:16 +02:00
slvrtrn
bb6d5d8d55 Support multiple roles via HTTP, update tests 2024-04-16 16:42:56 +02:00
slvrtrn
9889109780 Fix tests, fix error message 2024-04-15 22:07:42 +02:00
slvrtrn
3611415766 Add tests for the role query parameter 2024-04-15 20:41:35 +02:00
slvrtrn
d8fca3bdc5 Merge remote-tracking branch 'origin' into http-interface-role-query-param 2024-04-15 18:25:39 +02:00
slvrtrn
098cc92cdf Add role query param to the HTTP interface 2024-04-15 18:25:11 +02:00
Robert Schulze
3c35f14804
Merge remote-tracking branch 'ClickHouse/master' into mkmkme/protobuf-25.1 2024-04-15 12:38:59 +00:00
kssenii
27672e1dfc Merge remote-tracking branch 'origin/master' into use-iobject-storage-for-table-engines-1 2024-04-15 11:28:14 +01:00
Robert Schulze
8167b774b5
Merge pull request #62307 from rschu1ze/cleanup-ssh
Cleanup SSH-based authentication code
2024-04-09 21:10:09 +00:00
Sergei Trifonov
8349bdd006
Merge pull request #61534 from ClickHouse/fix-db-iterator-waits
Fix db iterator wait during async metrics collection
2024-04-08 12:10:50 +02:00
kssenii
357e5e3ae6 Merge remote-tracking branch 'origin/master' into use-iobject-storage-for-table-engines-1 2024-04-05 16:15:56 +02:00
Robert Schulze
9d8f643f5b
Cleanup SSH-based authentication code 2024-04-05 08:43:23 +00:00
kssenii
1e982a2368 Merge remote-tracking branch 'origin/master' into use-iobject-storage-for-table-engines-1 2024-04-04 13:26:06 +02:00
kssenii
be30806dbe Merge remote-tracking branch 'origin/master' into use-iobject-storage-for-table-engines-1 2024-04-04 13:20:12 +02:00
Robert Schulze
de2a0be025
Don't access static members through instance
- clang-tidy rightfully complains (-readability-static-accessed-through-instance)
- not going to enable the warning for now to avoid breaking the build
2024-04-03 18:50:33 +00:00
Kruglov Pavel
21abaa14e7
Merge pull request #61951 from Avogar/fix-exception-in-format
Fix writing exception message in output format in HTTP when http_wait_end_of_query is used
2024-04-03 13:44:30 +02:00
Mikhail Koviazin
e7a664e9df
Merge remote-tracking branch 'upstream/master' into mkmkme/protobuf-25.1 2024-04-03 13:51:37 +03:00
serxa
5afec7b64d Merge branch 'master' into fix-db-iterator-waits 2024-04-03 09:29:32 +00:00
avogar
22fb91a6ef Fix tests 2024-04-02 18:18:32 +00:00
Raúl Marín
c35a436435 Remove nested dependency on DateLutImpl 2024-04-02 14:45:48 +02:00
Raúl Marín
40a22ffa63 Remove a few nested include dependencies 2024-04-02 13:43:14 +02:00
kssenii
ca1c119115 Merge remote-tracking branch 'origin/master' into use-iobject-storage-for-table-engines-1 2024-03-27 22:32:44 +01:00
Nikita Taranov
7b17b14aa0
Merge pull request #61671 from GrigoryPervakov/master
Reload certificate chain during certificate reload
2024-03-27 21:19:32 +01:00
kssenii
e0c02bf3af Merge remote-tracking branch 'origin/master' into use-iobject-storage-for-table-engines-1 2024-03-27 19:27:07 +01:00
avogar
98f99db6b2 Remove unneded change 2024-03-26 16:01:56 +00: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
Pervakov Grigorii
a2ad832dfe fix error handling 2024-03-25 17:13:30 +00:00
kssenii
46941e7243 Merge remote-tracking branch 'origin/master' into use-iobject-storage-for-table-engines-1 2024-03-25 15:10:11 +01:00
Pervakov Grigorii
570dc32b07 fix style 2024-03-25 14:09:53 +00:00
Pervakov Grigorii
6b50f5bf10 Reload certificate chain during certificate reload 2024-03-25 14:09:53 +00:00
Alexey Milovidov
baef1cd4d2 Merge branch 'master' into get-client-http-header 2024-03-24 21:37:14 +01:00
Alexey Milovidov
d249d53de6 Remove DataStreams 2024-03-24 02:07:41 +01:00
Alexey Milovidov
e195806c5b Add function getClientHTTPHeader, part 1 2024-03-23 20:52:26 +01:00
Alexey Milovidov
a56c113c83 Fix for clang-19 2024-03-22 22:12:59 +01:00
Sean Haynes
dc677f0f18 Use scheduleOrThrow in MergeTree data selector thread pool
At the moment, the use of scheduleOrThrowOnError doesn't currently
have a timeout. So if you reach a point of saturation and use all
threads available in the global pool, threads block infinitely
and lead to a deadlock.

This changes that behaviour so that MergeTree data selector threads
will have a timeout and return a "No threads available" exception
to clients.

Credit to Nikita Mikhaylov for the proposition here:

https://github.com/ClickHouse/ClickHouse/pull/56431
2024-03-22 16:46:20 +00:00
avogar
47095f63b1 Fix writing exception message in output format in HTTP when http_wait_end_of_query is used 2024-03-22 16:03:28 +00:00
Alexander Tokmakov
9082a018a5
Merge pull request #59082 from ClickHouse/fix_race_async_inserts_queue
Fix race on `Context::async_insert_queue`
2024-03-22 16:06:13 +01:00
serxa
67819b1484 Merge branch 'master' into fix-db-iterator-waits 2024-03-21 10:53:54 +00:00
Alexander Tokmakov
5d7e5e5a72 Merge branch 'master' into fix_race_async_inserts_queue 2024-03-19 19:39:25 +01:00
kssenii
0122c3e883 Merge remote-tracking branch 'origin/master' into use-iobject-storage-for-table-engines-1 2024-03-19 19:31:02 +01:00
Raúl Marín
de855ca917 Reduce header dependencies 2024-03-19 17:04:29 +01:00
serxa
051103b0e0 Fix db iterator wait during async metrics collection 2024-03-18 15:39:21 +00:00
Robert Schulze
c17536c3b3
Enable clang-tidy in headers 2024-03-18 08:00:09 +00:00
Alexey Milovidov
01136bbc3b Limit backtracking in parser 2024-03-17 19:54:45 +01:00
kssenii
bfc4f5e1d3 Merge remote-tracking branch 'origin/master' into use-iobject-storage-for-table-engines-1 2024-03-11 14:57:15 +01:00
Anton Popov
61859ee865
Merge pull request #61055 from CurtizJ/fix-async-insert-deadlock
Fix deadlock in async inserts to `Log` tables via native protocol
2024-03-08 11:36:49 +01:00
Nikita Mikhaylov
8e3fc1044f
Reject INSERT if async_insert=1 + deduplicate_blocks_in_dependent_materialized_views=1 (#60888) 2024-03-07 20:39:56 +01:00
Anton Popov
b9d6f4b3ed fix deadlock in async inserts via native protocol 2024-03-07 17:42:50 +00:00
kssenii
0aade3765f Merge remote-tracking branch 'origin/master' into use-iobject-storage-for-table-engines-1 2024-03-06 17:02:50 +08:00
kssenii
0c293bce11 Merge remote-tracking branch 'origin/master' into use-iobject-storage-for-table-engines-1 2024-03-06 12:06:19 +08:00
Antonio Andelic
fb8241c651 Better 2024-03-04 16:36:46 +01:00
Antonio Andelic
9f5fe176ad Catch exceptions on finalize 2024-03-04 14:42:11 +01:00
Alexey Milovidov
c362bbc9ca
Merge pull request #60390 from ClickHouse/redirect-handlers
Allow configuring HTTP redirect handlers for clickhouse-server
2024-03-02 05:15:31 +03:00
Mikhail Koviazin
11371e886c
Update protobuf to v25.1
The new version deprecates `syntax()` and makes it inaccessible. Instead, the
attributes corresponding to a feature should be used. This commit addresses
this.
2024-03-01 17:03:10 +02:00
Yakov Olkhovskiy
7d5b5a094d
don't move from capture - it is used repeatedly 2024-02-29 18:50:25 -05:00
Robert Schulze
4ee1aa8c7c
Fixing more headers 2024-02-29 15:40:30 +00:00
Alexey Milovidov
b0ab0b37db
Merge pull request #60434 from ClickHouse/revert-60216-revert-59697-check-stack-size-in-parser
Revert "Revert "Check stack size in Parser""
2024-02-28 19:20:49 +03:00
Alexey Milovidov
9ea7ff231b
Merge pull request #60448 from ClickHouse/clang-19
Update to clang-19
2024-02-27 23:38:08 +03:00
Alexey Milovidov
0f3c9963d1 Merge branch 'master' of github.com:ClickHouse/ClickHouse into revert-60216-revert-59697-check-stack-size-in-parser 2024-02-27 17:30:32 +01:00
Alexey Milovidov
c192a448d0 Update to clang-19 2024-02-27 14:37:21 +01:00
Alexey Milovidov
0b90076a36
Revert "Revert "Check stack size in Parser"" 2024-02-27 01:34:50 +03:00
Alexey Milovidov
fbfc4afb46
Merge branch 'master' into redirect-handlers 2024-02-27 01:27:38 +03:00
Robert Schulze
ac7a3cd18d
Merge remote-tracking branch 'rschu1ze/master' into mysql-friday-evening-fix 2024-02-26 22:00:45 +00:00
Alexey Milovidov
bbf9561a65
Merge pull request #60389 from ClickHouse/allow-remap-web-ui-handlers
Allow to map UI handlers to different paths
2024-02-26 21:03:59 +03:00
Alexey Milovidov
bad7ee271c Merge branch 'redirect-handlers' of github.com:ClickHouse/ClickHouse into redirect-handlers 2024-02-26 17:27:48 +01:00
Alexey Milovidov
0469bdb639 Fix tidy 2024-02-26 17:27:29 +01:00
Antonio Andelic
5b01c4feb3
Revert "Fix: IAST::clone() for RENAME" 2024-02-26 08:47:05 +01:00
Alexey Milovidov
34e85959c1
Update HTTPServerResponse.cpp 2024-02-26 03:34:35 +03:00
Alexey Milovidov
9f4041e3f7 Add support for HTTP redirects 2024-02-25 23:45:09 +01:00
Alexey Milovidov
2756160aea Allow to map UI handlers to different paths 2024-02-25 23:04:39 +01:00
Robert Schulze
b9f5a2f620
Enable prefer_column_name_to_alias in MySQL Handler, default enable two MySQL settings 2024-02-23 17:42:54 +00:00
mikhnenko
e6aaa278a2 Add missed #include <mutex> 2024-02-23 17:23:11 +03:00
Igor Nikonov
90b1f8544a
Merge pull request #60227 from ClickHouse/fix-clone-ast-for-rename
Fix: IAST::clone() for RENAME
2024-02-23 14:48:14 +01:00
Azat Khuzhin
87fb8d187b Change back how receive_timeout is handled for INSERTs
Right now the receive_timeout for INSERT works as a timeout for
receiving data block, however this is not very convenient, since
sometimes server may not send data for quite some time (i.e. due to in
order aggregation), Ping packets is there for a reason (also Progress
and ProfileEvents as well, though the purpose is different).

Initially this special handling of receive_timeout had been added in
6a5ef9be83 ("dbms: fixed error with
hanging INSERTs [#METR-16514]"), but the behaviour was different, since
that time the receivePacket() was outside loop, only poll() was there,
and that was the workaround for poll() timeout (which does not triggers
the socket timeout).

But in fabd7193bd ("Code cleanups and
improvements"), receivePacket() had been moved into the loop, and so
this changed the behaviour of the timeout to current one.

Though all of this will not help for INSERT queries anyway, since there
are no Ping packets for them. Yet.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-02-22 14:26:21 +01:00
kothiga
0bc7c0a558
Addressing feedback. 2024-02-21 17:01:16 -08:00
kothiga
692b31e467
Fix http exception codes. 2024-02-21 10:53:49 -08:00
Igor Nikonov
f4643b8341 Fix: RENAME AST clone
+ minor cleanup
2024-02-21 14:14:33 +00:00
Antonio Andelic
fee1565780
Revert "Check stack size in Parser" 2024-02-21 11:33:08 +01:00
kssenii
e23b929e18 Merge remote-tracking branch 'origin/master' into use-iobject-storage-for-table-engines-1 2024-02-19 19:55:47 +01:00
Alexey Milovidov
fa1ca348a4 Miscellaneous 2024-02-19 03:19:21 +01:00
Alexey Milovidov
6fd563df52 Miscellaneous 2024-02-19 02:58:51 +01:00
Alexey Milovidov
2f315e0eb5 Style check for abbreviations 2024-02-17 02:14:15 +01:00
kssenii
1cccb3ccdf Merge remote-tracking branch 'origin/master' into use-iobject-storage-for-table-engines-1 2024-02-16 15:21:10 +01:00
Kruglov Pavel
4d6f167e0c
Merge pull request #59092 from Avogar/auto-format-detection
Try to detect file format automatically during schema inference if it's unknown
2024-02-16 14:32:18 +01:00
Antonio Andelic
0f489de46e
Merge pull request #59945 from ClickHouse/keeper-prometheus-filtered-events
Send only Keeper related metrics/events for Prometheus
2024-02-16 09:43:43 +01:00
Konstantin Bogdanov
dbb6804a70
Merge pull request #59976 from ClickHouse/add-cloud-placement
Add `PlacementInfo`
2024-02-15 19:16:56 +03:00
Julia Kartseva
b1b58ef9a3
Revert "Insert synchronously if dependent MV deduplication is enabled" 2024-02-14 12:54:42 -08:00
Antonio Andelic
0bee591a0c Fix build 2024-02-14 14:10:58 +01:00
Konstantin Bogdanov
83f28b8537
Move definition to cpp 2024-02-14 12:51:14 +01:00
Konstantin Bogdanov
e6450f8af2
More missing headers 2024-02-14 11:48:03 +01:00
Konstantin Bogdanov
5f2358b014
Add missing header 2024-02-14 11:22:47 +01:00
Konstantin Bogdanov
914fd27d5b
Add PlacementInfo 2024-02-14 10:19:36 +01:00
Kruglov Pavel
1dbfeafb42
Merge branch 'master' into auto-format-detection 2024-02-13 19:08:33 +01:00
Antonio Andelic
0d151e3f0d Send only specific events/metrics for Keeper prometheus 2024-02-13 16:01:50 +01:00
kssenii
3cca841038 Unite s3/hdfs/azure storage implementations into a single class on top of IObjectStorage 2024-02-09 21:32:04 +01:00
Maksim Kita
9c3b363c81 Fixed tests 2024-02-09 21:39:36 +03:00
Maksim Kita
2fc8895ae8 Fixed tests 2024-02-09 21:39:36 +03:00
Julia Kartseva
ece4febe32 Insert synchronously if dependent MV deduplication is enabled 2024-02-08 08:42:04 +00:00
Sema Checherinda
8581bdbe58 do not call value() on empty optional query_info 2024-02-05 13:24:51 +01:00
Igor Nikonov
931fc6572c Call getFQDNOrHostName() once 2024-02-02 14:33:34 +00:00
Igor Nikonov
8c60c6b669 Use always host_name for profile events block 2024-02-02 14:27:09 +00:00
Igor Nikonov
4c75b4bc7c Return display name 2024-02-02 14:04:27 +00:00
Igor Nikonov
7cd78b7fc4 Fix clang-tidy warning 2024-02-02 13:09:23 +00:00
Igor Nikonov
d8a6e53d0b Use FQDN as host name by default for TCP
- instead of display_name setting value
2024-01-30 20:27:30 +00:00
Alexey Milovidov
a286d500c3
Merge pull request #59124 from amosbird/dashboard-compress-state
Compress state of dashboard
2024-01-30 08:05:38 +01:00
slvrtrn
7cef679f6d Address PR feedback 2024-01-29 20:11:02 +01:00
slvrtrn
eb909a5db4 Reapply add MySQL net write/read settings 2024-01-27 18:36:38 +01:00