Commit Graph

147264 Commits

Author SHA1 Message Date
Azat Khuzhin
22611781b0 Fix jemalloc assertion due to non-monotonic CLOCK_MONOTONIC_COARSE
Recently one tricky assertion of jemalloc had been discovered [1]:

    Failed assertion: "nstime_compare(&decay->epoch, new_time) <= 0"

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

And as it turns out it is really possible for CLOCK_MONOTONIC_COARSE to
go backwards, in a nutshell it can be done with ADJ_FREQUENCY, you can
find example here [2]. And I can't trigger this issue for non-coarse
clocks.

  [2]: https://gist.github.com/azat/7ea7f50ed75591b1af2d675a240ea94c?permalink_comment_id=5119222#gistcomment-5119222

But, jemalloc do not call clock_gettime() that frequently (I've verified
it), so it can use non-coarse version - CLOCK_MONOTONIC

I've also measured the latency of CLOCK_MONOTONIC and
CLOCK_MONOTONIC_COARSE, and it is 20ns vs 4ns per call [3], so make this
change affect performance you need really frequently calls of
clock_gettime.

  [3]: https://gist.github.com/azat/622fa1f9a5d8e7d546ee9d294501961d?permalink_comment_id=5119245#gistcomment-5119245

Interesting, that this bug started to appears only after jemalloc heap
profiler had been enabled by default [4], no clue why (I would believe
more in a more frequent calls to clock_adjtime(ADJ_FREQUENCY), but I
can't verify this)

  [4]: https://github.com/ClickHouse/ClickHouse/pull/65702

To be continued...

Fixes: https://github.com/ClickHouse/ClickHouse/issues/66193
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-07-14 08:21:13 +02:00
Shaun Struwig
5daac46d8c
Merge branch 'ClickHouse:master' into docs_partitionID 2024-07-14 05:34:01 +02:00
Alexey Milovidov
045a7f4b8f Merge branch 'master' of github.com:ClickHouse/ClickHouse into add-test-37557 2024-07-14 01:10:39 +02:00
Alexey Milovidov
4237912d4e Merge branch 'master' into add-test-37557 2024-07-14 01:10:29 +02:00
Haydn
6ed138b1a4 Fix syntax error in generateSnowflakeID.cpp 2024-07-13 16:06:31 -07:00
Haydn
5826f1f073 [ClickHouse-66010] Add machine_id parameter to generateSnowflakeID function and update tests 2024-07-13 15:39:48 -07:00
Shaun Struwig
a90e10c438 add alias partitionI, update tests, and docs 2024-07-13 22:38:28 +00:00
Alexey Milovidov
860db03d13
Merge pull request #66460 from ClickHouse/tavplubix-patch-10
Update 00992_system_parts_race_condition_zookeeper_long.sh
2024-07-13 22:21:00 +00:00
Robert Schulze
dfb831f861
Try to fix an msan issue 2024-07-13 22:07:46 +00:00
Alexey Milovidov
a8219d3848
Merge pull request #66233 from arthurpassos/remove_concurrent_auth_storm
Remove host regexp concurrent integration test
2024-07-13 21:37:58 +00:00
Alexey Milovidov
e3a2a2e487
Merge pull request #66353 from ClickHouse/collect-minio-logs
Collect logs from `minio` in stateless and statefull tests
2024-07-13 21:34:50 +00:00
Alexey Milovidov
6ba7765b81
Update 03203_multiif_and_where_2_conditions_old_analyzer_bug.sql 2024-07-13 23:33:29 +02:00
Alexey Milovidov
e71f0fe385
Merge pull request #66375 from azat/dist-fix-log
Fix "Sending a batch of X files to Y (0.00 rows, 0.00 B bytes)." in case of batch restoring
2024-07-13 21:32:21 +00:00
Alexey Milovidov
d320528f04
Merge pull request #66376 from azat/tests/03030_system_flush_distributed_settings
Fix 03030_system_flush_distributed_settings flakiness
2024-07-13 21:31:15 +00:00
Alexey Milovidov
c322c6b423
Merge pull request #66398 from azat/play-elapsed
Add query elapsed time for non-default format in play UI
2024-07-13 21:30:56 +00:00
Haydn
08cce45258 Fix handling of machine_id in generateSnowflakeID to read conditionally and assign efficiently 2024-07-13 14:25:42 -07:00
Haydn
0925830f2e Refactored generateSnowflakeID function implementation and added comprehensive SQL tests 2024-07-13 14:01:03 -07:00
Alexey Milovidov
b7465016cb
Merge pull request #66406 from ClickHouse/remove-noisy-message
Remove noisy message
2024-07-13 20:55:39 +00:00
Alexey Milovidov
62dac875b8
Merge pull request #66435 from ClickHouse/limit_linker_jobs_on_aarch
Limit number of linker jobs on arm to avoid OOM during build
2024-07-13 20:50:49 +00:00
Alexey Milovidov
f037e01620
Merge pull request #66461 from yariks5s/fix_logical_error_npy
Fix logical error in npy data format
2024-07-13 20:49:26 +00:00
Alexey Milovidov
b123659702 Merge branch 'master' into tavplubix-patch-10 2024-07-13 22:48:20 +02:00
Robert Schulze
2f913f193c
Fixup docs 2024-07-13 20:25:58 +00:00
Alexey Milovidov
11647c2382
Merge pull request #65973 from ClickHouse/named-collections-in-clickhouse-local
Named collections in clickhouse-local
2024-07-13 20:22:27 +00:00
Alexey Milovidov
4ebd88f64a
Merge pull request #66477 from ClickHouse/ci_strict_job_check
CI: Check job's exit status and report if killed
2024-07-13 20:22:08 +00:00
Robert Schulze
eb9a629868
Revert "remove partitionID function, update tests and remove from documentation"
This reverts commit c3b72386a2.
2024-07-13 20:06:37 +00:00
Robert Schulze
cef13cfa72
Revert "Update 02415_all_new_functions_must_be_documented.reference"
This reverts commit ee4162f5ec.
2024-07-13 20:06:19 +00:00
Robert Schulze
9b87a1469b
Revert "Fix integration tests"
This reverts commit 85f5fe832a.
2024-07-13 20:06:12 +00:00
Robert Schulze
7e0daae303
Revert "Fix style"
This reverts commit 0eb081f899.
2024-07-13 20:05:39 +00:00
Shaun Struwig
1e03ca16b2
Update developer-instruction.md 2024-07-13 21:52:01 +02:00
Alexey Milovidov
707994b876 Add a test for #37557 2024-07-13 21:48:53 +02:00
Max K
09b753ecc5 CI: Check job's exit status and report if killed 2024-07-13 21:13:03 +02:00
Max K
000cd64d60
Merge pull request #66339 from ClickHouse/create_release_wf
Create release workflow
2024-07-13 18:55:47 +00:00
Shaun Struwig
a1229c1ebb
Update install.md
Production builds will not run on older ARM CPUs
2024-07-13 20:37:13 +02:00
Zawa-II
404840bf2c [ClickHouse-66010] Add-machine_id-to-generateSnowflakeID
Extend existing tests and retain expr argument in generateSnowflakeID

Commit expected output file

Add argument validation in generateSnowflakeID function

Style Check

Style Check by changing error type

Style Check by removing error check

Add new test cases for  function including  parameter

Add new test cases for generateSnowflakeID function with machine_id parameter and update reference file

Add new test cases for generateSnowflakeID function with machine_id parameter and update reference file to match expected output

Fix generateSnowflakeID function to correctly handle optional machine_id parameter, update documentation and examples, and clean up tests.

Fix typo in generateSnowflakeID function and correctly handle optional machine_id parameter.
2024-07-13 11:30:45 -07:00
vdimir
b357cd6b5b
Merge branch 'master' into vdimir/debug_02956_rocksdb_bulk_sink 2024-07-13 20:02:57 +02:00
Max K
bce601f22e
Merge pull request #66471 from ClickHouse/ci_skip_all_not_affected_jobs_in_ci
CI: Autoskip all non-affected jobs in PRs
2024-07-13 17:30:35 +00:00
Alexey Milovidov
96d3c31190
Update play.html 2024-07-13 18:51:00 +02:00
Max K
f9b1f2498a fix 2024-07-13 18:49:23 +02:00
Max K
162d875aee persistent job report path 2024-07-13 18:28:13 +02:00
Max K
d99c56ae8c CI: Autoskip all non-affected jobs in PRs 2024-07-13 17:25:45 +02:00
Robert Schulze
b1fd7868e5
Merge remote-tracking branch 'ClickHouse/master' into change_date 2024-07-13 15:12:32 +00:00
Max K
578d22ae94 style
Automatic style fix

Automatic style fix
2024-07-13 16:23:46 +02:00
Max K
9f1520ae21 do not autofix if not only black failed 2024-07-13 16:21:40 +02:00
Max K
2cd1a39ff4 style fixes
Automatic style fix
2024-07-13 16:21:33 +02:00
Max K
1050217445 add support for new release branch
Automatic style fix
2024-07-13 16:21:22 +02:00
Max K
f8e71707f2 update black 2024-07-13 16:21:22 +02:00
Max K
99cd83da1f New Create Release workflow 2024-07-13 16:21:22 +02:00
Sema Checherinda
0d1a8cac98 Merge branch 'master' into revert-66134-revert-61601-chesema-dedup-matview 2024-07-13 14:58:12 +02:00
Max K
2ff09bdf18
Merge pull request #66440 from ClickHouse/ci_not_block_on_few_test_failures
CI: Do not block CI on few number of test failures
2024-07-13 12:13:28 +00:00
Max K
b4369bf183
Merge pull request #66468 from ClickHouse/ci_add_digest_config_for_ast
CI: Cache AST fuzzers (run always) jobs
2024-07-13 11:31:48 +00:00