Vitaly Baranov
ecfe6fddcf
Move function HTTPHandler::formatExceptionForClient() to a separate header in order to reuse it.
2024-07-03 21:23:09 +02:00
Vitaly Baranov
49b982747a
Move function authenticateUserByHTTP() to a separate header in order to reuse it.
2024-07-03 21:23:09 +02:00
Vitaly Baranov
25dc96aaca
Simplify initialization of settings in HTTPHandler.
2024-07-03 21:23:09 +02:00
Vitaly Baranov
bf56ad69dd
Make Context::setCurrentRoles() check that new current roles are granted in order to make HTTPHandler's implementation easier.
2024-07-03 21:23:09 +02:00
Vitaly Baranov
29ed1c9bf8
Move function exceptionCodeToHTTPStatus() from HTTPHandler.cpp to a separate header in order to reuse it.
2024-07-03 21:23:09 +02:00
Konstantin Bogdanov
138eb924fa
Merge pull request #65626 from tonickkozlov/tonickkozlov/x509-san-validation
...
Add support for x509 SubjectAltName identification
2024-07-02 11:20:01 +00:00
Azat Khuzhin
4f2a0e8eeb
Fix possible issues with MySQL server protocol TLS connections
...
The problem here is that retries (in SecureSocketImpl.cpp::mustRetry())
relies on non-zero socket timeout, but MySQL handler does not set
timeouts for the socket (like other does), and this leads to a problem
when OpenSSL returns SSL_ERROR_WANT_READ/SSL_ERROR_WANT_WRITE, the
connection will be simply terminated.
I've played with this patch, by hacking the openssl sources:
diff --git a/crypto/bio/bss_sock.c b/crypto/bio/bss_sock.c
index 82f7be85ae..a399291ff4 100644
--- a/crypto/bio/bss_sock.c
+++ b/crypto/bio/bss_sock.c
@@ -124,7 +125,18 @@ static int sock_read(BIO *b, char *out, int outl)
ret = ktls_read_record(b->num, out, outl);
else
# endif
- ret = readsocket(b->num, out, outl);
+ {
+ /* pthread_kill(pthread_self(), SIGUSR1); */
+ static int i = 0;
+ if (!(++i % 2))
+ {
+ fprintf(stderr, "sock_read: inject EAGAIN\n");
+ ret = -1;
+ errno = EAGAIN;
+ }
+ else
+ ret = readsocket(b->num, out, outl);
+ }
BIO_clear_retry_flags(b);
if (ret <= 0) {
if (BIO_sock_should_retry(ret))
And after this patch this succeed without errors:
ch benchmark -c10 -q "SELECT * FROM mysql('127.0.0.1:9004', system, one, 'default', '', SETTINGS connection_pool_size=1, connect_timeout = 100, connection_wait_timeout = 100)"
Note, that this also fixes the timeouts for plain (non-TLS) connections
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-07-01 15:22:33 +02:00
Anton Kozlov
b1b9aaf2ec
Add support for x509 SubjectAltName identification
2024-07-01 09:47:28 +00:00
Alexander Tokmakov
4748e2929f
Merge pull request #65570 from ClickHouse/keeper_az
...
Improve ZooKeeper load balancing
2024-06-28 22:57:20 +00:00
Kseniia Sumarokova
7892e77d9d
Merge pull request #65744 from ClickHouse/try-fix-race-in-tcp-handler
...
Try fix data race in TCPHandler between `processOrdinaryQuery -> sendProgress` and `fatal_error_callback -> sendLogs`
2024-06-27 10:27:24 +00:00
Sema Checherinda
4d409831a0
Merge pull request #64478 from ClickHouse/chesema-fix-buffer-cancelation
...
make writebuffers cancelable
2024-06-26 22:12:30 +00:00
kssenii
2e7c23b82c
Try fix data race in TCPHandler
2024-06-26 19:49:14 +02:00
Konstantin Bogdanov
665b4a9d1d
Merge pull request #62829 from ClickHouse/jwt-auth-in-client
...
Support JWT in `clickhouse-client`
2024-06-26 07:56:28 +00:00
Alexander Tokmakov
43cb2f6af7
remove trash
2024-06-26 02:03:22 +02:00
Sema Checherinda
072eb14493
fixing HTTPHandler
2024-06-25 23:04:47 +02:00
Sema Checherinda
e36a641a80
Merge branch 'master' into protocols-tls-extend-params
2024-06-20 19:02:12 +02:00
Sema Checherinda
19bafb5063
Merge branch 'master' into chesema-fix-buffer-cancelation
2024-06-20 18:10:53 +02:00
Anton Ivashkin
d06867e886
Catch exception in tryLoadImpl
2024-06-19 17:21:25 +02:00
Daniil Ivanik
3df8695ec4
Merge pull request #65118 from jmaicher/fix/65117/receive-timeout-exception-handling
...
Improve exception handling in case of receive timeout while reading (parts of) the request body
2024-06-19 13:04:17 +00:00
Yarik Briukhovetskyi
a08f77850c
Merge pull request #61047 from yariks5s/balancing_transform
...
Implementing `BalancingTransform` for inserts
2024-06-19 11:37:17 +00:00
Kseniia Sumarokova
784f66cf2f
Merge pull request #65239 from ClickHouse/tracing-try-2
...
Initialize global profiler for Poco::ThreadPool (needed for keeper, etc)
2024-06-19 09:00:46 +00:00
Konstantin Bogdanov
f2583db8a1
Support JWT in clickhouse-client
2024-06-19 04:29:46 +02:00
Anton Ivashkin
9a7655be2f
Catch exception in sslContext init
2024-06-18 11:20:50 +02:00
Julian Maicher
966a32a4d4
Fix HTTP exception handling in case of receive timeouts
...
Closes #65117
2024-06-18 07:57:43 +02:00
avogar
9dd43bbbea
Merge branch 'master' of github.com:ClickHouse/ClickHouse into balancing_transform
2024-06-17 18:08:19 +00:00
Sema Checherinda
2d16ab0c07
Merge branch 'master' into chesema-fix-buffer-cancelation
2024-06-17 17:15:29 +02:00
Anton Ivashkin
fc6f2aa59a
Small refactoring of CertificateReloader
2024-06-14 14:31:58 +02:00
kssenii
fb32a99578
Initialize global trace collector for Poco::ThreadPool
2024-06-13 19:20:58 +02:00
Grigorii Sokolik
80575fe122
Fix CI failure
2024-06-13 14:16:31 +03:00
Grigorii Sokolik
2aa2f2f7da
Rollback unnecessary style fixes
2024-06-13 11:21:48 +03:00
Grigorii Sokolik
7bff47701b
Fix styles
2024-06-13 11:21:48 +03:00
Grigorii Sokolik
06383d7a7a
Fix Static handler
2024-06-13 11:21:47 +03:00
Grigorii Sokolik
979b447451
Fix styles
2024-06-13 11:21:47 +03:00
Grigorii Sokolik
ffa66225d0
Fix tests
2024-06-13 11:21:47 +03:00
Grigorii Sokolik
a417a1c676
feat-59620 Style fix
2024-06-13 11:21:47 +03:00
Grigorii Sokolik
47686e0c4a
[feature] A setting http_response_headers
...
Implementing https://github.com/ClickHouse/ClickHouse/issues/59620
Deprecating `content_type` setting (still supported).
2024-06-13 11:21:47 +03:00
Yarik Briukhovetskyi
07e746d5a4
Merge branch 'ClickHouse:master' into balancing_transform
2024-06-12 12:16:24 +02:00
yariks5s
4a72b36f28
Revert "Revert "roll back some changes""
...
This reverts commit 66a714e3ee
.
2024-06-11 23:26:23 +00:00
yariks5s
66a714e3ee
Revert "roll back some changes"
...
This reverts commit a54d679357
.
2024-06-11 22:45:02 +00:00
yariks5s
a54d679357
roll back some changes
2024-06-11 18:46:09 +00:00
yariks5s
7b239f1102
fixes due to review
2024-06-11 17:36:49 +00:00
Sema Checherinda
b35ee73b15
Merge branch 'master' into chesema-fix-buffer-cancelation
2024-06-11 13:27:39 +02:00
yariks5s
f5137c351c
Merge branch 'balancing_transform' of https://github.com/yariks5s/ClickHouse into balancing_transform
2024-06-10 18:09:33 +00:00
yariks5s
68e1d8701c
fixes due to review
2024-06-10 18:09:07 +00:00
Alexey Milovidov
2c5ebf9ca6
Merge branch 'master' into master
2024-06-05 04:23:37 +02:00
Yarik Briukhovetskyi
34d5c64900
Merge branch 'ClickHouse:master' into balancing_transform
2024-06-04 21:12:06 +02:00
yariks5s
84c8c4ca48
try to assign header unconditionally
2024-05-30 18:28:24 +00:00
yariks5s
5a09dce95d
adding header in TCPHandler
2024-05-30 18:06:11 +00:00
yariks5s
826bec2575
added move constructor and removed unused parts
2024-05-30 16:33:48 +00:00
Sema Checherinda
8f4a7a7c09
work with tests
2024-05-30 17:07:36 +02:00