Commit Graph

1657 Commits

Author SHA1 Message Date
Vitaly Baranov
6d0bf97476
Merge pull request #66067 from vitlibar/move-http-handler-stuff-to-separate-files
Move some of HTTPHandler stuff to separate source files in order to reuse it in PrometheusRequestHandler
2024-07-08 21:03:22 +00:00
Vitaly Baranov
5ac5a4b2fe Add check that user name is not empty to authenticateUserByHTTP(). 2024-07-08 13:05:34 +02:00
Vitaly Baranov
c42b5eddd4 Fix error messages in authenticateUserByHTTP() when multiple authentication methods are used simultaneously. 2024-07-05 21:36:13 +02:00
Vitaly Baranov
e572dfd2dc Use Common/Base64.h 2024-07-05 20:15:19 +02:00
Sema Checherinda
77e60543fd
Revert "insertion deduplication on retries for materialised views" 2024-07-05 14:58:17 +02:00
Nikita Mikhaylov
3a7c98399f
Merge pull request #65777 from ClickHouse/make_analyzer_important
Make `allow_experimental_analyzer` be controlled by the initiator for distributed queries
2024-07-04 20:38:40 +00:00
Vitaly Baranov
6bf1320870
Merge pull request #66061 from vitlibar/fix-shutdown-in-grpc-server
Fix shutdown in GRPCServer
2024-07-04 14:33:59 +00:00
Sema Checherinda
19816401c4
Merge pull request #61601 from ClickHouse/chesema-dedup-matview
insertion deduplication on retries for materialised views
2024-07-04 13:52:52 +00:00
Nikita Mikhaylov
fe6a875c74 Make the setting back IMPORTANT + fix build 2024-07-04 11:12:27 +00:00
Nikita Mikhaylov
fcabefa8f3 Automatically disabling 2024-07-04 11:12:27 +00:00
Nikita Mikhaylov
dd3eb538f6 Better 2024-07-04 11:12:27 +00:00
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
Vitaly Baranov
e8701dc4e4 Fix shutdown in GRPCServer. 2024-07-03 18:18:23 +02:00
Antonio Andelic
cddd2312fb Merge branch 'master' into keeper-remove-standalone-build 2024-07-03 16:23:31 +02:00
Antonio Andelic
ce4d361cd7 Merge branch 'master' into keeper-remove-standalone-build 2024-07-03 16:23:06 +02:00
Antonio Andelic
e3beff45c1
Merge pull request #65918 from ClickHouse/add-some-tools-for-keeper-profiling
Add extra profiling helpers for Keeper
2024-07-03 07:01:13 +00:00
Sema Checherinda
06e235024f work with review 2024-07-02 15:16:57 +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
Antonio Andelic
a0f6751c4d Merge branch 'master' into add-some-tools-for-keeper-profiling 2024-07-02 10:50:24 +02: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
Antonio Andelic
1a95259182 Add extra profiling helpers for Keeper 2024-07-01 15:17:41 +02:00
Anton Kozlov
b1b9aaf2ec Add support for x509 SubjectAltName identification 2024-07-01 09:47:28 +00:00
Antonio Andelic
4a9daa202d Remove Keeper standalone build 2024-07-01 11:24:45 +02:00
Sema Checherinda
abe58184df Merge branch 'master' into chesema-dedup-matview 2024-06-29 01:35:32 +02: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
92375ec052 Merge branch 'master' into chesema-dedup-matview 2024-06-27 02:12:32 +02:00
Sema Checherinda
d485606e94 fix header in async insert and projections 2024-06-27 02:09:45 +02: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
Sema Checherinda
8efa045a97 fix resolving conflicts with squashing 2024-06-27 00:09:55 +02:00
kssenii
2e7c23b82c Try fix data race in TCPHandler 2024-06-26 19:49:14 +02:00
Sema Checherinda
5d2e2a9f44 Merge branch 'master' into chesema-dedup-matview 2024-06-26 17:03:05 +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
4d73a4f13b Merge branch 'master' into chesema-dedup-matview 2024-06-17 18:27:20 +02:00