Commit Graph

1783 Commits

Author SHA1 Message Date
Alexey Milovidov
a56c113c83 Fix for clang-19 2024-03-22 22:12:59 +01:00
Nikita Taranov
146d760338 rm more 2024-03-22 17:38:06 +00: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
Nikita Taranov
d7b34a80bb stash 2024-03-22 16:09:14 +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
Kruglov Pavel
46a6b84a5a
Merge branch 'master' into auto-format-detection 2024-01-25 22:11:07 +01:00
Maksim Kita
2a327107b6 Updated implementation 2024-01-25 14:31:49 +03:00
avogar
617cc514b7 Try to detect file format automatically during schema inference if it's unknown 2024-01-23 18:59:39 +00:00
Amos Bird
7e86c0e928
Compress state of dashboard 2024-01-23 23:04:19 +08:00
Alexander Tokmakov
4cfc8d1a34 better method name 2024-01-23 00:30:42 +01:00
Azat Khuzhin
d940afd6cd Fix timeouts for HTTP/1.1 non-chunked requests (missing Connection: close)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-01-19 14:48:50 +03:00
Azat Khuzhin
38ad4ef493 Fix timeout for prometheus exporter for HTTP/1.1 (due to keep-alive)
Before:

    $ time curl -s --http1.1 127.1:9363/metrics > /dev/null
    real    0m10.018s # default keep_alive_timeout is 10 seconds
    user    0m0.005s
    sys     0m0.001s

After

    $ time curl -s --http1.1 127.1:9363/metrics > /dev/null
    real    0m0.008s
    user    0m0.006s
    sys     0m0.000s

And if you will look at the test_prometheus_endpoint, you will see that
it takes > 30 seconds (it obtains metrics 3 times), after this patch it
should be finished more or less instantly.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-01-19 13:29:17 +03:00
Robert Schulze
cf115e696b
Merge pull request #58929 from slvrtrn/mysql-show-warnings
Add `SHOW WARNINGS` support in MySQL interface
2024-01-18 16:24:50 +01:00
slvrtrn
cb8372a3f9 Add SHOW WARNINGS support in MySQL interface 2024-01-17 22:00:48 +01:00
Yakov Olkhovskiy
92d42567fa separate explicit finalization for buffers 2024-01-16 22:15:35 +00:00
Alexander Tokmakov
661500a140
Revert "Add support for MySQL net_write_timeout and net_read_timeout settings" 2024-01-16 15:01:14 +01:00
Yakov Olkhovskiy
fcd4297d20 fix compressors finalization 2024-01-16 00:22:17 +00:00
slvrtrn
204a291384 Remove an unnecessary include 2024-01-15 17:52:58 +01:00
slvrtrn
8ad6b03649 Add a test for MySQL settings replacements 2024-01-15 17:15:07 +01:00
slvrtrn
d37ac1954e Add support for net_write/read_timeout MySQL settings 2024-01-15 16:05:36 +01:00
Yakov Olkhovskiy
84809b36c3
Merge pull request #58475 from ClickHouse/revert-58450-revert-56064-feature-server-iface-metrics
Second attempt: Use CH Buffer for HTTP out stream, add metrics for interfaces
2024-01-11 12:06:59 -05:00
Robert Schulze
38f1a5eb27
Follow-up to #58458
In MySQLHandler.cpp,
    return 1 == std::regex_match(query, expr);
was converted to
    return re2::RE2::PartialMatch(query, expr);

Should have been FullMatch(query, expr)
2024-01-10 17:03:53 +00:00
Yakov Olkhovskiy
4fc11e189c
Merge branch 'master' into revert-58450-revert-56064-feature-server-iface-metrics 2024-01-10 12:03:47 -05:00
Yakov Olkhovskiy
45d5e29ba0 master merge adjustments 2024-01-10 16:55:09 +00:00
Yakov Olkhovskiy
2e124b19b8
Merge branch 'master' into revert-58450-revert-56064-feature-server-iface-metrics 2024-01-10 09:05:18 -05:00
Robert Schulze
499227b9cf
Merge remote-tracking branch 'rschu1ze/master' into replace-std_regexp-by-re2 2024-01-10 10:02:53 +00:00
Robert Schulze
ced9e93ac6
Merge remote-tracking branch 'rschu1ze/master' into qatzstd_main 2024-01-09 20:36:02 +00:00
Robert Schulze
f553b55e3a
Merge remote-tracking branch 'rschu1ze/master' into regex-std-re2 2024-01-07 22:31:35 +00:00
Robert Schulze
8e804487f3
Some fixups 2024-01-07 22:28:08 +00:00
Robert Schulze
53965bb9f1
Merge remote-tracking branch 'rschu1ze/master' into qatzstd_main 2024-01-07 14:11:22 +00:00
Yakov Olkhovskiy
84dd4a74bc fix exception leaking from destructor 2024-01-05 15:45:36 +00:00
Duc Canh Le
2e14cfb526 add settings for output compression level and window size
Signed-off-by: Duc Canh Le <duccanh.le@ahrefs.com>
2024-01-04 08:16:00 +00:00
Yakov Olkhovskiy
85f03478ef
Revert "Revert "Use CH Buffer for HTTP out stream, add metrics for interfaces"" 2024-01-03 11:47:15 -05:00
Robert Schulze
8d4b519bb1
Replace std::regex by re2 2024-01-03 15:06:20 +00:00
Yakov Olkhovskiy
db97764e98 fix tests, some refactoring 2023-12-31 12:56:37 +00:00
Alexey Milovidov
01c7562cc3 Merge with master 2023-12-30 16:01:17 +01:00
Alexey Milovidov
aa462fa7cd
Merge branch 'master' into feature-server-iface-metrics 2023-12-29 22:37:52 +01:00
Kruglov Pavel
c03e36e012
Merge branch 'master' into better-parsing-exceptions 2023-12-29 18:07:32 +01:00
Alexey Milovidov
c2f93ecf4d
Merge pull request #58211 from ClickHouse/binary-viewer
Binary (symbols) viewer
2023-12-25 04:52:57 +01:00
Azat Khuzhin
3be3b0a280 Fix incorrect Exceptions
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-12-24 21:26:32 +01:00
Alexey Milovidov
0e89d01b94 Binary (symbols) viewer 2023-12-24 12:14:45 +01:00
jinjunzh
aaf98f0ed7 refine setting with enable_zstd_qat_codec 2023-12-22 14:24:15 -05:00
Yakov Olkhovskiy
d8bfb0184d fix after merge 2023-12-21 00:23:42 +00:00
Yakov Olkhovskiy
5dc88542cb
Merge branch 'master' into feature-server-iface-metrics 2023-12-20 16:46:29 -05:00
santrancisco
1e86fb298a
Fixing check for HTTP POST request 2023-12-20 12:37:36 +11:00
Nikita Mikhaylov
6360b76792 Merge branch 'master' of github.com:ClickHouse/ClickHouse into remove-the-limit-for-connections-per-endpoint 2023-12-18 21:49:31 +00:00
Raúl Marín
65728f14ce Review error codes 2023-12-18 10:40:02 +01:00
Yakov Olkhovskiy
001a38048f use ProfileEvents instead of CurrentMetrics 2023-12-15 19:17:42 +00:00
Raúl Marín
b269f87f4c Better text_log with ErrnoException 2023-12-15 19:27:56 +01:00
Yakov Olkhovskiy
24e1e65dc0 update after merge 2023-12-14 20:25:31 +00:00
Yakov Olkhovskiy
febdd542f8 Merge remote-tracking branch 'origin/master' into feature-server-iface-metrics 2023-12-14 18:59:44 +00:00
Yakov Olkhovskiy
6d20082134 return the early release and instead restore prepared_client_info and reset session_context 2023-12-14 17:25:47 +00:00
Nikita Mikhaylov
a0af0392cd
Random changes in random files (#57642) 2023-12-14 12:47:11 +01:00
Nikita Mikhaylov
8372c70958 Merge branch 'master' of github.com:ClickHouse/ClickHouse into remove-the-limit-for-connections-per-endpoint 2023-12-13 18:29:56 +00:00
Kruglov Pavel
ee39dca8c7
Merge branch 'master' into better-parsing-exceptions 2023-12-12 17:10:38 +01:00
Konstantin Bogdanov
ea123ed5c1
Change response structure 2023-12-12 11:35:01 +01:00
Konstantin Bogdanov
69a022f72a
Add observer status 2023-12-12 09:42:32 +01:00
Konstantin Bogdanov
be9fac3a55
Lint includes
Co-authored-by: alesapin <alesapin@clickhouse.com>
2023-12-12 09:26:06 +01:00
Konstantin Bogdanov
7172a8ec9a
Remove redundant include 2023-12-11 10:20:43 +01:00
Konstantin Bogdanov
76966818ba
Fix FreeBSD build 2023-12-11 10:20:34 +01:00
Konstantin Bogdanov
771d5c58ea
Fix Keeper standalone build 2023-12-11 10:19:49 +01:00
Konstantin Bogdanov
89ba4a8452
Add HTTP readiness endpoint 2023-12-11 10:19:42 +01:00
Nikita Mikhaylov
5251548753 Fix tests and build 2023-12-08 17:28:26 +00:00
Nikita Mikhaylov
c979124cfe Merge branch 'master' of github.com:ClickHouse/ClickHouse into remove-the-limit-for-connections-per-endpoint 2023-12-08 16:25:02 +00:00
Nikita Mikhaylov
08cc9408f2 Better 2023-12-07 17:53:40 +01:00
Nikolay Degterinsky
a776a5cac5
Merge pull request #57483 from joelynch/stop-listen-tcp-secure
bugfix: correctly parse SYSTEM STOP LISTEN TCP SECURE
2023-12-05 15:25:34 +01:00
Nikita Mikhaylov
04d167c6d9 Better 2023-12-05 13:34:37 +01:00
Alexey Milovidov
cbea3545aa
Revert "add function getClientHTTPHeader" 2023-12-05 13:34:34 +03:00
joelynch
f346667956
Simpler fix 2023-12-04 20:13:53 +01:00
Yakov Olkhovskiy
416d28687e Merge remote-tracking branch 'origin/master' into feature-server-iface-metrics 2023-11-30 23:00:04 +00:00
Yakov Olkhovskiy
549a90ba09 unfortunately we can't release session's named_session early because its context's ClientInfo still may be used in ~Session - next session can start and compete for this data 2023-11-30 19:56:25 +00:00
robot-clickhouse-ci-1
1740ef80e5
Merge pull request #57209 from ClickHouse/errors-prometheus
Expose the number of errors occurred on server from the Prometheus endpoint.
2023-11-29 10:39:04 +01:00
Antonio Andelic
a61f32867e
Merge pull request #56488 from lingtaolf/feature/getHTTPHeader
add function getClientHTTPHeader
2023-11-28 11:41:56 +01:00
Yakov Olkhovskiy
b92030b485
Merge branch 'master' into feature-server-iface-metrics 2023-11-27 15:44:25 -05:00
Nikita Mikhaylov
1b623b0e48 Done 2023-11-24 20:03:02 +00:00
Antonio Andelic
c43b84c68d
Typo 2023-11-23 13:12:16 +01:00
Antonio Andelic
953a8d774a Close interserver connection on exception that happened before first authentication 2023-11-23 11:43:03 +00:00
avogar
7e392eec50 Better exception messages in input formats 2023-11-21 13:13:42 +00:00
凌涛
e86aa433c5
Merge branch 'master' into feature/getHTTPHeader 2023-11-21 19:48:47 +08:00
凌涛
c5f16725ec add function getClientHTTPHeader 2023-11-21 11:12:01 +08:00
Nikolay Degterinsky
44289c5f19
Merge pull request #56957 from evillique/resubmit-better-except
Resubmit: Better except for SSL authentication
2023-11-19 16:00:18 +01:00
Nikolay Degterinsky
6eedd1649d Resubmit: Better except for SSL authentication 2023-11-18 17:56:05 +00:00
Alexey Milovidov
3bbb329dd0 Fix tests 2023-11-16 00:13:05 +01:00
Alexey Milovidov
1ea74cee3a Early disconnect if there is authentication failure with interserver secret 2023-11-15 15:04:07 +01:00
Alexey Milovidov
82c461031e Fix build 2023-11-13 10:09:23 +01:00
Robert Schulze
3f49e1c5ed
Merge remote-tracking branch 'rschu1ze/master' into pcg 2023-11-12 11:43:19 +00:00
Kseniia Sumarokova
ecd98006ce
Merge pull request #56306 from ClickHouse/fix-backup-restore-flatten-nested
Fix restore from backup with `flatten_nested` and `data_type_default_nullable`
2023-11-10 11:43:17 +01:00
robot-clickhouse-ci-1
af785a8f4d
Merge pull request #56497 from ClickHouse/Change_keeper_compression_to_LZ4
Updated compression to LZ4
2023-11-09 18:26:43 +01:00
Robert Schulze
949863872a
Merge pull request #56059 from rschu1ze/bump-grpc
Bump gRPC to v1.47.5
2023-11-09 11:35:38 +01:00
Smita Kulkarni
9a9efdcf7d Updated compression to LZ4 as its better in performance 2023-11-09 10:10:22 +01:00
Robert Schulze
a1a9cb7577
Bump gRPC to v1.44.1 2023-11-07 19:52:59 +00:00
Robert Schulze
e46dbcb2f1
Use pcg/randomSeed() random generator/seed instead of std::mt19937/std::random_device 2023-11-07 18:54:50 +00:00
kssenii
9178fd4ad1 Fix case with replicated database 2023-11-07 16:02:51 +01:00
Yakov Olkhovskiy
c66c7c044e release session id earlier 2023-11-06 05:13:18 +00:00
Yakov Olkhovskiy
d9fe33ae7b fix clang tidy 2023-11-04 03:06:45 +00:00
Yakov Olkhovskiy
4f11132ea2 fix clang tidy 2023-11-04 00:00:14 +00:00
Yakov Olkhovskiy
ba72cf4dc6 early session ID release 2023-11-02 17:34:46 +00:00
Smita Kulkarni
a716e12ec0 Addressed review comments 2023-11-02 14:52:10 +01:00
Smita Kulkarni
374545f4e2 Removed unwanted flush & updated to use optional for buffers 2023-11-02 09:38:53 +01:00
Smita Kulkarni
3361c5d973 Updated using read write buffer into modules 2023-11-01 12:05:41 +01:00
Yakov Olkhovskiy
ad3b46b5a7 fix send HTTP header 2023-10-31 12:56:06 +00:00
Smita Kulkarni
3fdf0daf1b Merge branch 'master' into 49507_Support_compression_for_keeper_protocol 2023-10-31 10:43:28 +01:00
Yakov Olkhovskiy
43c2c83ae2 fix X-ClickHouse-Exception-Code 2023-10-31 01:10:37 +00:00
Yakov Olkhovskiy
9f4be7e847 fix 2023-10-30 23:31:15 +00:00
Alexey Milovidov
dbd97726f4
Merge pull request #56035 from azat/fix-send-receive-timeout
Do not mix-up send_timeout and receive_timeout
2023-10-30 20:59:26 +01:00
Yakov Olkhovskiy
e1d0994c0a fix 2023-10-30 05:37:47 +00:00
Yakov Olkhovskiy
9c34ac5a6f fix 2023-10-29 18:54:45 +00:00
Yakov Olkhovskiy
d72069dea4 compressors to not produce output for no data, HTTP buffer not to add Content-Encoding if no data 2023-10-29 18:21:21 +00:00
Alexey Milovidov
6eff22568f
Revert "Add function getHttpHeader" 2023-10-29 19:50:39 +03:00
Yakov Olkhovskiy
7887e1e14e fix 2023-10-28 23:26:38 +00:00
Yakov Olkhovskiy
6ed150b9d3 fix 2023-10-28 20:53:39 +00:00
Yakov Olkhovskiy
5ef24494f4 fix 2023-10-28 18:36:28 +00:00
Yakov Olkhovskiy
b64b009670 fix http compression setting 2023-10-28 06:48:49 +00:00
Yakov Olkhovskiy
aa855aa9b1 more fixes 2023-10-28 05:15:49 +00:00
Yakov Olkhovskiy
ec8d7a93dd fix finalize 2023-10-27 19:58:04 +00:00
Yakov Olkhovskiy
c12b3c5b56 fix 2023-10-27 08:02:44 +00:00
Yakov Olkhovskiy
53402da6df fix style 2023-10-27 04:58:36 +00:00
Yakov Olkhovskiy
0cf851316c use CH Buffer for HTTP out stream, add metrics for interfaces 2023-10-27 02:38:36 +00:00
Azat Khuzhin
8556929f50 Fix mixing of send_timeout and receive_timeout
I've noticed this in one of production setups, where lots of queries are
executed with distributed_group_by_no_merge=2 (automatically vai
optimize_skip_unused_shards optimization) and
optimize_aggregation_in_order=1, with this two settings initiator may
not read from some shards (i.e. X) for quite long period of time,
because it reads from other shards (i.e. Y) and it does not need
any data from X yet (due to it read everything in order), and this will
lead to query timeout, so timeouts had been increased.

Previously both timeouts had been tuned, but this leads to connection
hungs in case of abnormal machine reboots. So it is better to tune only
send_timeout (and this should be enough, since the only problem is the
sender) and this will allow to see that the connection is broken on the
initiator once it will read from this shard.

but after changing only send_timeout, the query still timedout, and the
reason is this place, which swaps this timeouts.

It had been introduced in 134efcd, with a comment:

    NOTE: We use send_timeout for the receive timeout and vice versa (change arguments ordering in TimeoutSetter),
     because send_timeout is client-side setting which has opposite meaning on the server side.

But it sounds odd to me, it may only make sense with the
clickhouse-client, since any other driver does not implement any server
settings.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-10-26 19:36:12 +02:00
Konstantin Bogdanov
ecafc77e0f
Merge pull request #55521 from ClickHouse/fix-query-params-with-custom-http-handlers
Fix Query Parameters not working with custom HTTP handlers
2023-10-26 18:34:37 +02:00
Smita Kulkarni
d1d8f4b2e1 Merge branch 'master' into 49507_Support_compression_for_keeper_protocol 2023-10-26 16:56:03 +02:00
Robert Schulze
a6eb57a14c
Merge pull request #56006 from rschu1ze/no-scopedlock
Convert unnecessary std::scoped_lock usage to std::lock_guard
2023-10-25 22:59:27 +02:00
Konstantin Bogdanov
b0bbb4d804
Fix ASan failure 2023-10-25 15:54:10 +02:00
Robert Schulze
04272fa481
Convert unnecessary std::scoped_lock to std::lock_guard 2023-10-25 09:26:16 +00:00
Smita Kulkarni
ede91f42e6 Addressed review comments 2023-10-23 16:42:08 +02:00
Alexey Milovidov
5217d64551 Remove garbage 2023-10-22 01:53:50 +02:00
Alexey Milovidov
7ec4b99e94 Revert partial result 2023-10-21 03:14:22 +02:00
Anton Popov
5819bcd07a
Support asynchronous inserts for native protocol (#54730)
* support async insert for native protocol

* use separate queue for async inserts via native protocol

* fix test

* better logging for async inserts and more tests

* disable mixed internal and external data in async inserts

* fix tests

* fix quota in async inserts

* disable async insert for secondary query of distributed
2023-10-20 18:39:48 +02:00
Konstantin Bogdanov
dc31963748
Update URI filter for query endpoint once again 2023-10-20 13:00:06 +02:00
Konstantin Bogdanov
1491e6d626
Update URI filter for query endpoint once again 2023-10-20 12:45:54 +02:00
Konstantin Bogdanov
685415d75a
Check if URL path is empty in case of POST or OPTIONS query to query endpoint 2023-10-17 12:40:41 +02:00
Konstantin Bogdanov
9207dae99b
Check if URL path to be empty in case of GET or HEAD query to query endpoint 2023-10-17 06:09:20 +02:00
Konstantin Bogdanov
72617c587e
Remove previous commits leftovers 2023-10-17 00:14:20 +02:00
Konstantin Bogdanov
320eb24f14
Fix formatting 2023-10-17 00:14:20 +02:00
Konstantin Bogdanov
065db21c75
Update URI filter for query HTTP handler 2023-10-17 00:14:20 +02:00
Konstantin Bogdanov
3374568ad0
Register default HTTP handlers as the last ones due to aggressive handler matching for /query endpoint 2023-10-17 00:14:20 +02:00
Konstantin Bogdanov
ab2d20a4b6
Sync query parameter parsing logic between PredefinedQueryHandler and DynamicQueryHandler 2023-10-17 00:14:20 +02:00
Konstantin Bogdanov
4ca27bdb7b
Add URI filter for /query handler 2023-10-17 00:14:04 +02:00
Smita Kulkarni
8b54172983 Merge branch 'master' into 49507_Support_compression_for_keeper_protocol 2023-10-12 12:32:43 +02:00
凌涛
51e2e59a97 Merge remote-tracking branch 'origin/master' into feature/function-getClientHttpHeader 2023-10-10 10:56:24 +08:00
Alexey Milovidov
c7ae1afb8f Review #51946 and partially revert it 2023-10-08 15:17:41 +02:00
alesapin
4f7b81b6a5 Make HandlingRuleHTTPHandlerFactory more stupid, but less error prone 2023-10-07 18:12:58 +02:00
vdimir
3f3feea0b7
Add setting allow_experimental_partial_result 2023-09-28 09:40:56 +00:00
Robert Schulze
2d750e9e2f
Merge remote-tracking branch 'rschu1ze/master' into clang-tidy-reenable-checks 2023-09-27 12:15:29 +00:00
凌涛
0d256a381a add doc
fix tests

modify code stype and spelling

add tests and modify code style
2023-09-27 17:03:53 +08:00
Robert Schulze
cde10fe7b5
Merge remote-tracking branch 'rschu1ze/master' into clang-tidy-reenable-checks 2023-09-26 18:59:41 +00:00
Alexey Milovidov
29d3b34dfc
Merge pull request #54090 from ClickHouse/remove-current-status
Remove CurrentStatusInfo
2023-09-26 21:38:07 +03:00
George Gamezardashvili
0ce30ab6d5
SSH keys authentication (#41109)
Added new type of authentication based on SSH keys. It works only for Native TCP protocol.

Co-authored-by: Nikita Mikhaylov <nikitamikhaylov@clickhouse.com>
Co-authored-by: Robert Schulze <robert@clickhouse.com>
2023-09-26 17:50:19 +02:00
Kruglov Pavel
69a17bbef6
Merge pull request #52853 from Avogar/http-valid-json-on-exception
Output valid JSON/XML on excetpion during HTTP query execution
2023-09-26 14:25:55 +02:00
Robert Schulze
9fff447716
Re-enable clang-tidy checks 2023-09-26 09:34:12 +00:00
Smita Kulkarni
9c8815386a Fixed tryExecuteFourLetterWordCmd 2023-09-25 14:48:09 +02:00
Alexey Milovidov
580f3c1a01 Merge branch 'master' into remove-current-status 2023-09-24 20:56:17 +02:00
Smita Kulkarni
c11aa4515b Merge branch 'master' into 49507_Support_compression_for_keeper_protocol 2023-09-24 11:52:57 +02:00
Smita Kulkarni
ca07275143 Support compression for keeper protocol 2023-09-24 11:38:08 +02:00
Robert Schulze
a0862531cb
Fix clang-17 build 2023-09-21 09:53:52 +00:00
Antonio Andelic
1a94675350 Don't capture this in callback 2023-09-20 13:32:01 +00:00
凌涛
9e3c54ddb9 add function getHttpHeader 2023-09-20 10:07:02 +08:00
Kruglov Pavel
e163670357
Merge branch 'master' into http-valid-json-on-exception 2023-09-19 13:42:53 +02:00
Robert Schulze
f5e8028bb1
Merge pull request #54642 from rschu1ze/broken-re2st
Remove broken lockless variant of re2
2023-09-17 15:30:57 +02:00
Kruglov Pavel
dbd24b240c
Merge branch 'master' into http-valid-json-on-exception 2023-09-15 14:55:31 +02:00
Robert Schulze
7b378dbad3
Remove broken lockless variant of re2 2023-09-14 16:40:42 +00:00
slvrtrn
44e1f6b53d Fix LowCardinality/Nullable columns issues 2023-09-13 23:40:31 +02:00
slvrtrn
007a75c0ac PR review 2023-09-13 19:33:05 +02:00
slvrtrn
dddea9219a Address the review comments 2023-09-12 18:39:03 +02:00
slvrtrn
611a75a87f Merge remote-tracking branch 'origin' into simplified-prepared-statements-for-mysql 2023-09-12 10:38:44 +02:00
Alexey Milovidov
eba8af425b
Merge pull request #50722 from ClibMouse/http_codes
Add new exceptions to 4xx error
2023-09-11 20:42:20 +03:00
Nikolai Kochetov
59108f3d96
Merge pull request #54476 from ClickHouse/revert-54470-revert-48607-master
Revert "Revert "Add settings for real-time updates during query execution""
2023-09-11 14:59:13 +02:00
robot-clickhouse-ci-2
47c0f8c99f
Merge pull request #54179 from joelynch/http-query-timing
Add elapsed_ns to HTTP headers X-ClickHouse-Progress and X-ClickHouse-Summary
2023-09-11 06:18:47 +02:00
robot-ch-test-poll
6f3374d684
Merge pull request #54481 from ucasfl/hints
Refactor IHints
2023-09-10 15:46:36 +02:00
flynn
6ec783a746 Refactor IHints 2023-09-10 03:48:12 +00:00
Nikolai Kochetov
9b936c44db
Revert "Revert "Add settings for real-time updates during query execution"" 2023-09-09 12:29:39 +02:00
Alexey Milovidov
03a755732a
Revert "Add settings for real-time updates during query execution" 2023-09-09 03:10:23 +03:00
Nikolai Kochetov
0095124791
Merge pull request #48607 from alexX512/master
Add settings for real-time updates during query execution
2023-09-08 09:05:33 +02:00
Yakov Olkhovskiy
0dd6928a13
Merge pull request #53068 from nickitat/unify_keep_alive_setting
Unify setting http keep-alive timeout, increase default to 30s
2023-09-05 22:05:23 -04:00
Joe Lynch
767f2472c2
Add elapsed_ns to HTTP headers X-ClickHouse-Progress and X-ClickHouse-Summary
The TCP interface progress has this field. This is not a super accurate
measure of server side query time, but trying to measure from the client
is even worse.
2023-09-05 21:03:13 +02:00
slvrtrn
eddf914421 Clear prepared statements when it's too many 2023-09-04 23:00:24 +02:00
slvrtrn
bb0eff9669 Revert format changes 2023-09-04 21:15:26 +02:00
Raúl Marín
e192d4c624
Fix summary reporting with parallel replicas with LIMIT (#53050) 2023-09-04 15:53:06 +02:00
kssenii
3f20d1f578 Rename 2023-09-01 12:55:58 +02:00
alexX512
36b8932b37 Merge branch 'master' of github.com:ClickHouse/ClickHouse 2023-08-31 21:40:50 +00:00
Alexey Milovidov
1910434174 Remove CurrentStatusInfo 2023-08-30 20:48:26 +02:00
slvrtrn
8378441248 Merge remote-tracking branch 'origin' into simplified-prepared-statements-for-mysql 2023-08-30 19:00:51 +02:00
Alexander Tokmakov
4d70624ca3
Merge pull request #53907 from arenadata/ADQM-1126
Added validate_tcp_client_information server setting
2023-08-30 15:10:13 +02:00
Alexey Gerasimchuck
f7d1041e61 minor improvement 2023-08-30 06:14:39 +00:00
Alexey Gerasimchuck
be2f80cc1c minor corrections 2023-08-29 23:59:36 +00:00
Alexey Gerasimchuck
a1687e618b backward compatibility changes + fixes 2023-08-29 23:50:41 +00:00
Sergei Trifonov
802579f3f1
Merge pull request #49618 from ClickHouse/concurrency-control-controllable
Make concurrency control controllable
2023-08-29 19:44:51 +02:00
alexX512
b3ba00f443 Merge branch 'master' of github.com:ClickHouse/ClickHouse 2023-08-29 10:59:29 +00:00
Alexey Gerasimchuck
e9757abea6 Added validate_tcp_client_information setting 2023-08-29 00:15:55 +00:00
slvrtrn
055d2e3c3d Merge remote-tracking branch 'origin' into simplified-prepared-statements-for-mysql 2023-08-25 21:27:47 +02:00
slvrtrn
734ffd916c WIP prepared statements 2023-08-25 20:31:21 +02:00
Alexey Gerasimchuck
3140958132 Added client_info validation 2023-08-22 03:52:57 +00:00
Nikita Mikhaylov
145c99ee94
Merge pull request #53280 from evillique/better-stop-listen
Add EXCEPT clause to SYSTEM STOP LISTEN query
2023-08-21 19:03:49 +02:00
Yakov Olkhovskiy
c73037a602 Merge remote-tracking branch 'ch/master' into unify_keep_alive_setting 2023-08-17 20:40:18 +00:00
Nikolay Degterinsky
c6fc31c1e3 Review suggestions 2023-08-16 23:06:42 +00:00
Nikolay Degterinsky
a893f75884 Merge remote-tracking branch 'upstream/master' into better-stop-listen 2023-08-16 23:06:18 +00:00
Alexander Tokmakov
78d8557a56 fix 2023-08-15 15:37:09 +02:00
Alexey Milovidov
d332861c6b
Merge pull request #53302 from arenadata/ADQM-1011_bug_fix
#3 Fixed inconsistency between login success and logout
2023-08-12 17:32:57 +03:00
Sergei Trifonov
771710b377
Merge branch 'master' into concurrency-control-controllable 2023-08-11 16:50:13 +02:00
Nikita Mikhaylov
dbe13e3016
Merge pull request #53110 from rmarduga/master
Add hints for HTTP handlers
2023-08-11 14:09:33 +02:00
robot-ch-test-poll
8f6eae5e26
Merge pull request #53183 from ClickHouse/remove-heavy-templates
Remove unnecessary templates
2023-08-11 12:56:02 +02:00
Alexey Gerasimchuck
0a49f45f7a Fixed inconsistency between login success and logout 2023-08-11 03:42:39 +00:00
Alexey Milovidov
aae35f3b1c
Merge pull request #53184 from ClickHouse/better-ccache
Better usage of ccache
2023-08-11 04:43:45 +03:00
Alexey Milovidov
3193c6d4cc Fix build 2023-08-11 00:55:57 +02:00
Alexey Milovidov
5fa4cb9345
Revert "#2 Added new tests for session_log and fixed the inconsistency between login and logout." 2023-08-11 00:59:48 +03:00
Nikolay Degterinsky
bcc0fbbf91 Add EXCEPT clause to SYSTEM STOP LISTEN query 2023-08-10 16:10:33 +00:00
robot-ch-test-poll3
c3c4125328
Merge pull request #53255 from arenadata/ADQM-1011
#2 Added new tests for session_log and fixed the inconsistency between login and logout.
2023-08-10 17:06:24 +02:00
Alexey Milovidov
bb57caa83e
Merge pull request #53180 from ClickHouse/ditch-tons-of-garbage
Ditch tons of garbage
2023-08-10 16:59:51 +03:00
Alexey Milovidov
f35df23974
Merge branch 'master' into better-ccache 2023-08-10 16:52:32 +03:00
Kruglov Pavel
6600f87f86
Merge branch 'master' into http-valid-json-on-exception 2023-08-10 13:53:32 +02:00
Ruslan Mardugalliamov
5cdeacf4cf Add hints for HTTP handlers
Add hints to HTTP handlers to help users avoid
misspellings. For example, if a user mistakenly writes
`/dashboad` instead of `/dashboard`, they will now get a
hint that /dashboard is the correct handler.

This change will improve the user experience by making it
easier for users to find the correct handlers.

 #47662
2023-08-10 06:23:20 -04:00
Alexey Gerasimchuck
b8be7eef04 Added new tests for session_log and bugfix 2023-08-10 03:45:59 +00:00
Alexey Milovidov
c071f6755d
Revert "Added new tests for session_log and fixed the inconsistency between login and logout." 2023-08-10 04:10:03 +03:00
slvrtrn
7fdb414793 One more [[unlikely]] 2023-08-09 15:18:05 +02:00
Alexey Milovidov
fa9abc5038 Better usage of ccache 2023-08-09 05:02:50 +02:00
Alexey Milovidov
aa757490bd Ditch tons of garbage 2023-08-09 02:19:02 +02:00
slvrtrn
d8904ffa69 Simplified prepared statements handling for MySQL interface 2023-08-08 23:48:23 +02:00
alexX512
520a3c6eeb Merge branch 'master' of github.com:ClickHouse/ClickHouse 2023-08-07 16:52:51 +00:00
Sergei Trifonov
541a77f16b
Merge branch 'master' into concurrency-control-controllable 2023-08-07 14:23:10 +02:00
Sergei Trifonov
dcac12c8f9
Merge branch 'master' into concurrency-control-controllable 2023-08-07 13:43:02 +02:00
Nikita Taranov
37d382aba4 impl 2023-08-05 20:30:49 +02:00
Alexey Gerasimchuck
1e7daca85b Added new tests for session_log plus bugfix 2023-08-03 22:06:33 +00:00
alexX512
0d84226914 Merge branch 'master' of github.com:ClickHouse/ClickHouse 2023-08-02 19:18:59 +00:00
Kruglov Pavel
23aab71d7c
Merge branch 'master' into http-valid-json-on-exception 2023-08-01 16:47:31 +02:00
Sergei Trifonov
01196ac41f
Merge branch 'master' into concurrency-control-controllable 2023-08-01 15:40:50 +02:00
avogar
a71cd56a90 Output valid JSON/XML on excetpion during HTTP query execution 2023-08-01 10:06:56 +00:00
Antonio Andelic
0374b3de3e
Update src/Server/KeeperTCPHandler.cpp
Co-authored-by: Azat Khuzhin <a3at.mail@gmail.com>
2023-08-01 09:04:55 +02:00
Andy Fiddaman
f9e0a202a7 clickhouse-keeper: fix implementation of server with poll() 2023-07-31 18:02:15 +01:00
Alexander Tokmakov
7359a8108b
Merge pull request #51724 from arenadata/ADQM-939
Added max_sessions_for_user setting
2023-07-31 15:38:58 +03:00
Alexey Gerasimchuck
e58b3cfd32 Implemented max sessions for user 2023-07-30 22:09:03 +00:00
Nikolay Degterinsky
eb74e658b7 Fix build 2023-07-27 19:12:06 +00:00
Nikolay Degterinsky
b5160c8072 Fix bugs and better test for SYSTEM STOP LISTEN 2023-07-27 14:16:19 +00:00
Nikolay Degterinsky
d89e2e6a27
Add SYSTEM STOP LISTEN query (#51016)
Co-authored-by: Nikita Mikhaylov <nikitamikhaylov@clickhouse.com>
Co-authored-by: Nikita Mikhaylov <mikhaylovnikitka@gmail.com>
2023-07-26 19:58:41 +02:00
Sema Checherinda
83d869860e
Merge pull request #51946 from arenadata/ADQM-940
Expose Peak memory usage in query statistics.
2023-07-25 22:17:58 +03:00
alexX512
1fe2f052e3 Merge branch 'master' of github.com:ClickHouse/ClickHouse 2023-07-25 09:36:44 +00:00
Alexey Milovidov
21382afa2b Check for punctuation 2023-07-25 06:10:04 +02:00
Dmitry Kardymon
d4d381de7e Merge remote-tracking branch 'origin/master' into ADQM-940 2023-07-24 20:04:10 +00:00
Dmitry Kardymon
62f9a953fe Merge remote-tracking branch 'origin/master' into ADQM-940 2023-07-24 04:52:12 +00:00
Alexey Milovidov
1e467867e6 Attempt to fix LTO 2023-07-24 00:03:40 +02:00
Alexey Milovidov
00d6f2ee08 Use incbin for resources, part 1 2023-07-23 06:11:03 +02:00
alexX512
c403f56e09 Merge branch 'master' of github.com:ClickHouse/ClickHouse 2023-07-21 17:56:53 +00:00
Vitaly Baranov
815a3857de Remove non-const function Context::getClientInfo(). 2023-07-17 15:02:07 +02:00
Dmitry Kardymon
2bc7bb062c Add peak to http progress; not display peak if old server 2023-07-17 10:20:58 +00:00
Dmitry Kardymon
feebad3d3b Try to fix tests by adding mutex like in onProgress() 2023-07-14 14:39:24 +00:00
Dmitry Kardymon
7704469def Merge remote-tracking branch 'origin/master' into ADQM-940 2023-07-11 19:59:10 +00:00
Ilya Yatsishin
627e924a1b
Merge pull request #51696 from CheSema/write-to-finalized
fix write to finalized buffer
2023-07-11 11:48:49 +02:00
Dmitry Kardymon
09ba975ffc Merge remote-tracking branch 'origin/master' into ADQM-940 2023-07-10 13:32:29 +00:00
Alexey Milovidov
3d4800995f
Merge pull request #49732 from nickitat/impr_prefetch
Improve reading with prefetch
2023-07-09 06:10:58 +03:00
Alexey Milovidov
e4dd603919
Merge pull request #51497 from ClickHouse/fix-shutdown-race
Fix possible race on shutdown wait
2023-07-08 03:03:45 +03:00
Sema Checherinda
5f73bec325
Merge branch 'master' into write-to-finalized 2023-07-07 14:22:49 +02:00
Dmitry Kardymon
3fcfbb1038 Merge remote-tracking branch 'clickhouse/master' into ADQM-940 2023-07-07 15:09:41 +03:00
Robert Schulze
271297823a
Allow var-int encoded 64-bit integers with MSB=1
Resolves: #51486

Until now, it was illegal to encode 64-bit (unsigned) integers with
MSB=1, i.e. values > (1ULL<<63) - 1, as var-int. In more detail, the
var-int code used by ClickHouse server and client spent at most 9 bytes
per value such that 9 * 7 = 63 bits could be encoded. Some 3rd party
clients (e.g. Rust clickhouse-rs) had the same limitation, whereas other
clients understand the full range (Python clickhouse-driver).

PRs #47608 and #48628 added sanity checks as asserts or exceptions
during var-int encoding on the server side. This was considered okay as
such huge integers so far occurred only during testing (usually fuzzing)
but not in practice.

Issue #51486 is a new fuzzing issue where the exception thrown from the
sanity check led to a half-baked progress packet and as a result, a
logical error / server crash.

The only fix which is not another bandaid is to allow the full range in
var-int coding. Clients will have to allow the full range too, a note
will be added to the changelog. (the alternative was to create another
protocol version but as var-int is used all over the place this was
considered infeasible)

Review note: this is the relevant commit.
2023-07-06 20:23:23 +00:00
Nikita Taranov
c23e29d6aa don't account session's memory in thread/user mem tracker 2023-07-06 14:41:03 +02:00
Alexey Milovidov
2c96580a77
Merge branch 'master' into concurrency-control-controllable 2023-07-04 23:16:04 +03:00
Sergei Trifonov
4e099086cd
Merge branch 'master' into fix-shutdown-race 2023-07-03 11:15:34 +02:00
Robert Schulze
fe49e98455
Follow-up to re2 update 2023-06-02 (#50949) 2023-07-03 08:28:25 +00:00
Sema Checherinda
3ff5d43dec
Merge branch 'master' into write-to-finalized 2023-07-01 19:40:16 +02:00
Sema Checherinda
50449cc68d fix write to finalized buffer 2023-06-30 19:12:13 +02:00
Sergei Trifonov
48eb188065
Remove unused code 2023-06-30 15:53:37 +02:00
Dmitry Kardymon
bdfaffb6e2 Add/fix tests 2023-06-29 12:08:08 +00:00
Dmitry Kardymon
6f4d6fd8d6 Remove whitespace 2023-06-29 08:29:16 +00:00
Dmitry Kardymon
7e992955df Next trying slyle fix 2023-06-29 08:12:33 +00:00
Dmitry Kardymon
ffa4f37c9a Try to fix style 2023-06-29 06:59:42 +00:00
Dmitry Kardymon
b276f450f3 Remove whilespace 2023-06-28 14:12:32 +00:00
Dmitry Kardymon
a41ec1221e Http prototype 2023-06-28 13:50:53 +00:00
serxa
7583da9b38 fix 2023-06-27 18:48:54 +00:00
serxa
40f721ae4f fix possible race on shutdown wait 2023-06-27 17:14:33 +00:00
Robert Schulze
43c97d76bf
Merge pull request #44149 from zvonand/zvonand-implicit-tz
Session time zones
2023-06-23 14:28:49 +02:00
Alexey Milovidov
75ef844f99
Fix long test functions_bad_arguments (#51310)
Co-authored-by: Nikita Mikhaylov <mikhaylovnikitka@gmail.com>
2023-06-23 13:51:40 +02:00
Andrey Zvonov
d4316c7189
Merge branch 'master' into zvonand-implicit-tz 2023-06-22 17:23:20 +02:00
Sema Checherinda
01de36f1fa
Merge pull request #50395 from CheSema/better-log
require `finalize()` call before d-tor for all writes buffers
2023-06-21 21:12:02 +02:00
Andrey Zvonov
b4f2e4020d
Merge branch 'master' into zvonand-implicit-tz 2023-06-21 13:41:35 +02:00
Sema Checherinda
ce7cd67981 finalize CascadeWriteBuffer 2023-06-18 17:35:12 +02:00
Sema Checherinda
cf31fdb4d5 no finalize at d-tor in compression 2023-06-16 16:38:18 +02:00
Boris Kuschel
003565d08e
Add undefs 2023-06-12 07:28:21 -07:00
Boris Kuschel
ae28c549a7
Fix style 2023-06-09 09:10:06 -07:00
Robert Schulze
1aa158909e
enable_qpl_deflate_codec --> enable_deflate_qpl_codec 2023-06-09 12:43:33 +00:00
jinjunzh
f1192d59af
refine patch according to comments 2023-06-09 12:43:15 +00:00
jinjunzh
056ca4f555
Add extensive testing cases for deflate qpl codec 2023-06-09 12:42:59 +00:00