Commit Graph

145884 Commits

Author SHA1 Message Date
Robert Schulze
a9d05bc349
Merge remote-tracking branch 'ClickHouse/master' into bittest-throw-error-if-out-of-bounds 2024-07-02 11:47:15 +00:00
Nikita Mikhaylov
0d7ea528d2
Merge pull request #65971 from ClickHouse/minor-changes-changelog
Minor changes in CHANGELOG
2024-07-02 11:33:00 +00:00
Antonio Andelic
94dba17ad9 Fix test 2024-07-02 13:26:52 +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
kssenii
f2c06becd5 Fix race in s3queue 2024-07-02 13:17:28 +02:00
kssenii
2ce564daa0 Make 01006_simpod_empty_part_single_column_write.sh always use vertical merge 2024-07-02 13:05:17 +02:00
Nikita Mikhaylov
36f38e6ae3
Merge pull request #65921 from ClickHouse/no-random-json
No random settings for a test with `Object(JSON)`
2024-07-02 10:57:28 +00:00
vdimir
422b8dea31
Add database_replicated_allow_heavy_create to settings changes 2024-07-02 12:30:22 +02:00
vdimir
87e2fb4f74
Merge branch 'master' into vdimir/replicateddb_forbid_populate 2024-07-02 12:28:47 +02:00
vdimir
530ce95d62
Merge pull request #65816 from canhld94/fix_rocksdb_ttl
Fix EmbeddedRocksDB with TTL writes corrupted data
2024-07-02 10:27:36 +00:00
kssenii
f778ddd7bc Merge remote-tracking branch 'origin/master' into fix-tmp-data-in-cache-assertion 2024-07-02 12:12:08 +02:00
Kseniia Sumarokova
ee0c4093d4
Update run.sh 2024-07-02 12:03:27 +02:00
Kseniia Sumarokova
a905b24f75
Fix clang-tidy 2024-07-02 11:54:56 +02:00
Blargian
2eb750f8eb add missing transactionXYZ functions to docs 2024-07-02 11:35:54 +02:00
Alexey Milovidov
4613b23c37
Merge pull request #65634 from ClickHouse/fix-object-storage
Speed up loading of plain_rewritable disks; fix many bugs in ObjectStorage
2024-07-02 09:31:29 +00:00
Raúl Marín
d9909cb251
Merge branch 'master' into setting_247 2024-07-02 11:31:16 +02:00
vdimir
59bf6f16bd
Merge pull request #64818 from bigo-sg/too_large_hash_join
Refactor `HashJoin` to avoid `too large translation units`
2024-07-02 09:12:02 +00:00
vdimir
b94dd515c7
Merge pull request #65887 from bigo-sg/improve_concat
Allow to use `concat` function with empty arguments
2024-07-02 09:11:30 +00:00
Alexey Milovidov
dc8a8d9719 Remove unnatural punctuation from Parquet 2024-07-02 10:56:44 +02:00
Alexey Milovidov
ef6d579e7f Minor changes in CHANGELOG 2024-07-02 10:56:03 +02:00
Antonio Andelic
a0f6751c4d Merge branch 'master' into add-some-tools-for-keeper-profiling 2024-07-02 10:50:24 +02:00
Antonio Andelic
9e586f0871 Fixes 2024-07-02 10:50:21 +02:00
Antonio Andelic
aaffa64cdd Fix data race for Keeper snapshot queue 2024-07-02 10:36:20 +02:00
Pablo Marcos
93c1b5d8a7 Address issues pointed out in the PR 2024-07-02 08:21:51 +00:00
Alexey Milovidov
350711ec53 Merge branch 'master' into fix-object-storage 2024-07-02 08:17:59 +02:00
Azat Khuzhin
3b4d5b00de Re-configure yamllint to allow document-start
CI reported [1]:

    1:1       warning  found forbidden document start "---"  (document-start)

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/65563/27ef3066f685390227c84f31c7c95e1670f9960b/style_check.html

It was an error to forbid it, and it made only by mistake to ignore the
errors.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-07-02 07:13:22 +02:00
Alexey Milovidov
9d8cc51dc5
Merge pull request #65917 from azat/mysql-server-TLS-retries
Fix possible issues with MySQL server protocol TLS connections
2024-07-02 05:06:55 +00:00
Alexey Milovidov
3b1e1d01d4
Merge pull request #65848 from ClickHouse/Add_missing_workload_identity_changes
Add missing workload identity changes
2024-07-02 04:35:31 +00:00
Alexey Milovidov
0bb374b597 Fix error (tnx, @jkartseva) 2024-07-02 06:19:21 +02:00
Alexey Milovidov
e07cd70a1e Merge branch 'master' into fix-object-storage 2024-07-02 06:17:55 +02:00
Alexey Milovidov
99ffa2c1b3
Merge pull request #65909 from ClickHouse/auto/v24.6.1.4423-stable
Update version_date.tsv and changelogs after v24.6.1.4423-stable
2024-07-02 03:47:43 +00:00
Michael Kolupaev
30fce5b8d7
Merge pull request #65953 from ClickHouse/og
Use -Og instead of -O0 for debug builds
2024-07-02 03:39:04 +00:00
Alexey Milovidov
b4025b4768
Merge branch 'master' into auto/v24.6.1.4423-stable 2024-07-02 05:27:54 +02:00
Alexey Milovidov
3d67e6b127
Merge pull request #65928 from ClickHouse/follow-up-to-65046
Follow up to #65046
2024-07-02 03:27:08 +00:00
Alexey Milovidov
f627e89637
Merge pull request #65950 from nathanclevenger/patch-1
Fixed documentation typos
2024-07-02 03:17:00 +00:00
taiyang-li
13c3bab624 update doc 2024-07-02 09:54:37 +08:00
Alexey Milovidov
8a8b6a881b
Merge pull request #58970 from ClickHouse/dont-optimize-trivial-insert-select
Disable `optimize_trivial_insert_select` by default
2024-07-02 01:33:23 +00:00
Michael Kolupaev
a5ada16719 Use -Og instead of -O0 for debug builds 2024-07-02 01:11:44 +00:00
kssenii
27e0e57054 Use ReadBufferFromFileBase instead of ReadBufferFromFile for reread_buffer_from_file 2024-07-01 22:47:36 +02:00
Alexey Milovidov
78185fb4a1
Merge pull request #65938 from azat/mysql-client-TLS-retries
Fix possible issues with MySQL client protocol TLS connections
2024-07-01 20:36:14 +00:00
Nathan Clevenger
7a5bf2fc24
Fixed types
Replaced RabbitMQ with NATS
2024-07-01 15:14:37 -05:00
kssenii
d4312fe54b Fix 2024-07-01 21:55:45 +02:00
Raúl Marín
447c0db2bc Fix SettingsChangesHistory 24.7 2024-07-01 20:11:19 +02:00
Smita Kulkarni
ac648a1fe3 Fix build 2024-07-01 19:41:45 +02:00
Azat Khuzhin
ef24f51789 Fix handling of SSL_ERROR_WANT_READ/SSL_ERROR_WANT_WRITE with zero timeout
Previously if you were using socket without timeout it wasn't able to
handle SSL_ERROR_WANT_READ/SSL_ERROR_WANT_WRITE, and even though sockets
without timeouts is an odd thing (but it is possible - [1]), it still
may be possible somewhere.

  [1]: https://github.com/ClickHouse/ClickHouse/pull/65917

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-07-01 19:33:39 +02:00
Alexey Milovidov
1e549751c7
Merge pull request #65937 from ClickHouse/auto/v24.5.4.49-stable
Update version_date.tsv and changelogs after v24.5.4.49-stable
2024-07-01 16:56:03 +00:00
Azat Khuzhin
9c7db6711b Fix possible issues with MySQL client protocol TLS connections
Occasionally, 02479_mysql_connect_to_self fails on CI [1].

  [1]: https://github.com/ClickHouse/ClickHouse/issues/50911

The problem was indeed query profiler and EINTR, but not in a way you
may think.

For such failures you may see the following trace in trace_log:

    contrib/openssl/crypto/bio/bss_sock.c:127::sock_read
    contrib/openssl/crypto/bio/bio_meth.c:121::bread_conv
    contrib/openssl/crypto/bio/bio_lib.c:285::bio_read_intern
    contrib/openssl/crypto/bio/bio_lib.c:311::BIO_read
    contrib/openssl/ssl/record/methods/tls_common.c:398::tls_default_read_n
    contrib/openssl/ssl/record/methods/tls_common.c:575::tls_get_more_records
    contrib/openssl/ssl/record/methods/tls_common.c:1122::tls_read_record
    contrib/openssl/ssl/record/rec_layer_s3.c:645::ssl3_read_bytes
    contrib/openssl/ssl/s3_lib.c:4527::ssl3_read_internal
    contrib/openssl/ssl/s3_lib.c:4551::ssl3_read
    contrib/openssl/ssl/ssl_lib.c:2343::ssl_read_internal
    contrib/openssl/ssl/ssl_lib.c:2357::SSL_read
    contrib/mariadb-connector-c/libmariadb/secure/openssl.c:729::ma_tls_read
    contrib/mariadb-connector-c/libmariadb/ma_tls.c:90::ma_pvio_tls_read
    contrib/mariadb-connector-c/libmariadb/ma_pvio.c:250::ma_pvio_read
    contrib/mariadb-connector-c/libmariadb/ma_pvio.c:297::ma_pvio_cache_read
    contrib/mariadb-connector-c/libmariadb/ma_net.c:373::ma_real_read
    contrib/mariadb-connector-c/libmariadb/ma_net.c:427::ma_net_read
    contrib/mariadb-connector-c/libmariadb/mariadb_lib.c:192::ma_net_safe_read
    contrib/mariadb-connector-c/libmariadb/mariadb_lib.c:2138::mthd_my_read_query_result
    contrib/mariadb-connector-c/libmariadb/mariadb_lib.c:2212::mysql_real_query
    src/Common/mysqlxx/Query.cpp:56::mysqlxx::Query::executeImpl()
    src/Common/mysqlxx/Query.cpp:73::mysqlxx::Query::use()
    src/Processors/Sources/MySQLSource.cpp:50::DB::MySQLSource::Connection::Connection()

After which the connection will fail with:

    Code: 1000. DB::Exception: Received from localhost:9000. DB::Exception: mysqlxx::ConnectionLost: Lost connection to MySQL server during query (127.0.0.1:9004). (POCO_EXCEPTION)

But, if you will take a look at ma_tls_read() you will see that it has
proper retries for SSL_ERROR_WANT_READ (and EINTR is just a special case
of it), but still, for some reason it fails.

And the reason is the units of the read/write timeout, ma_tls_read()
calls poll(read_timeout) in case of SSL_ERROR_WANT_READ, but, it
incorrectly assume that the timeout is in milliseconds, but that timeout
was in seconds, this bug had been fixed in [2], and now it works like a
charm!

  [2]: https://github.com/ClickHouse/mariadb-connector-c/pull/17

I've verified it with patching openssl library:

    diff --git a/crypto/bio/bss_sock.c b/crypto/bio/bss_sock.c
    index 82f7be85ae..3d2f3926a0 100644
    --- a/crypto/bio/bss_sock.c
    +++ b/crypto/bio/bss_sock.c
    @@ -124,7 +124,24 @@ 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);
    +        {
    +            static int i = 0;
    +            static int j = 0;
    +            if (!(++j % 5))
    +            {
    +                fprintf(stderr, "sock_read: inject EAGAIN with ret=0\n");
    +                ret = 0;
    +                errno = EAGAIN;
    +            }
    +            else if (!(++i % 3))
    +            {
    +                fprintf(stderr, "sock_read: inject EAGAIN with ret=-1\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 before this patch (well, not the patch itself, but the referenced
patch in mariadb-connector-c) if you will pass read_write_timeout=1 it
will fail:

    SELECT * FROM mysql('127.0.0.1:9004', system, one, 'default', '', SETTINGS connect_timeout = 100, connection_wait_timeout = 100, read_write_timeout=1)
    Code: 1000. DB::Exception: Received from localhost:9000. DB::Exception: mysqlxx::ConnectionLost: Lost connection to MySQL server during query (127.0.0.1:9004). (POCO_EXCEPTION)

But after, it always works:

    $ 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, read_write_timeout=1)"
    ^CStopping launch of queries. SIGINT received.

    Queries executed: 478.

    localhost:9000, queries: 478, QPS: 120.171, RPS: 120.171, MiB/s: 0.001, result RPS: 120.171, result MiB/s: 0.001.

    0.000%          0.014 sec.
    10.000%         0.058 sec.
    20.000%         0.065 sec.
    30.000%         0.073 sec.
    40.000%         0.079 sec.
    50.000%         0.087 sec.
    60.000%         0.089 sec.
    70.000%         0.091 sec.
    80.000%         0.095 sec.
    90.000%         0.100 sec.
    95.000%         0.102 sec.
    99.000%         0.105 sec.
    99.900%         0.140 sec.
    99.990%         0.140 sec.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-07-01 18:39:43 +02:00
Nikita Taranov
9d3ddfb47f
Merge branch 'master' into add_table_name_to_mt_source_spans 2024-07-01 17:41:04 +02:00
Nikita Taranov
adcaf117a1 impl 2024-07-01 16:38:39 +01:00
Anton Popov
e439921d37 slightly better 2024-07-01 15:31:32 +00:00