Skip to content

Commit 7a223a1

Browse files
committed
update ch core to v25.8.2.29
1 parent cda94fc commit 7a223a1

File tree

4,166 files changed

+192266
-52079
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,166 files changed

+192266
-52079
lines changed

.clang-tidy

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
HeaderFilterRegex: '^.*/(base|src|programs|utils)/.*(h|hpp)$'
99

10+
# We don't want to use clang-tidy diagnostics in the "contrib" folder.
11+
ExcludeHeaderFilterRegex: '^.*/contrib/.*'
12+
1013
Checks: [
1114
'*',
1215

@@ -28,6 +31,7 @@ Checks: [
2831
'-bugprone-unchecked-optional-access',
2932
'-bugprone-crtp-constructor-accessibility',
3033
'-bugprone-not-null-terminated-result',
34+
'-bugprone-forward-declaration-namespace',
3135

3236
'-cert-dcl16-c',
3337
'-cert-err58-cpp',

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ tests/ci/cancel_and_rerun_workflow_lambda/app.py
1717
- Not for changelog (changelog entry is not required)
1818

1919

20-
### Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
20+
### Changelog entry (a [user-readable short description](https://github.com/ClickHouse/ClickHouse/blob/master/docs/changelog_entry_guidelines.md) of the changes that goes into CHANGELOG.md):
2121
...
2222

2323
### Documentation entry for user-facing changes
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# generated by praktika
2+
3+
name: VectorSearchStress
4+
on:
5+
schedule:
6+
- cron: 47 15 * * 0
7+
workflow_dispatch:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}
11+
12+
env:
13+
PYTHONUNBUFFERED: 1
14+
CHECKOUT_REF: ""
15+
16+
jobs:
17+
18+
config_workflow:
19+
runs-on: [self-hosted, style-checker-aarch64]
20+
needs: []
21+
name: "Config Workflow"
22+
outputs:
23+
data: ${{ steps.run.outputs.DATA }}
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@v4
27+
with:
28+
ref: ${{ env.CHECKOUT_REF }}
29+
30+
- name: Prepare env script
31+
run: |
32+
rm -rf ./ci/tmp ./ci/tmp ./ci/tmp
33+
mkdir -p ./ci/tmp ./ci/tmp ./ci/tmp
34+
cat > ./ci/tmp/praktika_setup_env.sh << 'ENV_SETUP_SCRIPT_EOF'
35+
export PYTHONPATH=./ci:.:
36+
cat > ./ci/tmp/workflow_config_vectorsearchstress.json << 'EOF'
37+
${{ needs.config_workflow.outputs.data }}
38+
EOF
39+
cat > ./ci/tmp/workflow_status.json << 'EOF'
40+
${{ toJson(needs) }}
41+
EOF
42+
ENV_SETUP_SCRIPT_EOF
43+
44+
- name: Run
45+
id: run
46+
run: |
47+
. ./ci/tmp/praktika_setup_env.sh
48+
set -o pipefail
49+
if command -v ts &> /dev/null; then
50+
python3 -m praktika run 'Config Workflow' --workflow "VectorSearchStress" --ci |& ts '[%Y-%m-%d %H:%M:%S]' | tee ./ci/tmp/job.log
51+
else
52+
python3 -m praktika run 'Config Workflow' --workflow "VectorSearchStress" --ci |& tee ./ci/tmp/job.log
53+
fi
54+
55+
vector_search_stress:
56+
runs-on: [self-hosted, arm-small]
57+
needs: [config_workflow]
58+
name: "Vector Search Stress"
59+
outputs:
60+
data: ${{ steps.run.outputs.DATA }}
61+
steps:
62+
- name: Checkout code
63+
uses: actions/checkout@v4
64+
with:
65+
ref: ${{ env.CHECKOUT_REF }}
66+
67+
- name: Prepare env script
68+
run: |
69+
rm -rf ./ci/tmp ./ci/tmp ./ci/tmp
70+
mkdir -p ./ci/tmp ./ci/tmp ./ci/tmp
71+
cat > ./ci/tmp/praktika_setup_env.sh << 'ENV_SETUP_SCRIPT_EOF'
72+
export PYTHONPATH=./ci:.:
73+
cat > ./ci/tmp/workflow_config_vectorsearchstress.json << 'EOF'
74+
${{ needs.config_workflow.outputs.data }}
75+
EOF
76+
cat > ./ci/tmp/workflow_status.json << 'EOF'
77+
${{ toJson(needs) }}
78+
EOF
79+
ENV_SETUP_SCRIPT_EOF
80+
81+
- name: Run
82+
id: run
83+
run: |
84+
. ./ci/tmp/praktika_setup_env.sh
85+
set -o pipefail
86+
if command -v ts &> /dev/null; then
87+
python3 -m praktika run 'Vector Search Stress' --workflow "VectorSearchStress" --ci |& ts '[%Y-%m-%d %H:%M:%S]' | tee ./ci/tmp/job.log
88+
else
89+
python3 -m praktika run 'Vector Search Stress' --workflow "VectorSearchStress" --ci |& tee ./ci/tmp/job.log
90+
fi
91+
92+
finish_workflow:
93+
runs-on: [self-hosted, style-checker-aarch64]
94+
needs: [config_workflow, vector_search_stress]
95+
if: ${{ !cancelled() }}
96+
name: "Finish Workflow"
97+
outputs:
98+
data: ${{ steps.run.outputs.DATA }}
99+
steps:
100+
- name: Checkout code
101+
uses: actions/checkout@v4
102+
with:
103+
ref: ${{ env.CHECKOUT_REF }}
104+
105+
- name: Prepare env script
106+
run: |
107+
rm -rf ./ci/tmp ./ci/tmp ./ci/tmp
108+
mkdir -p ./ci/tmp ./ci/tmp ./ci/tmp
109+
cat > ./ci/tmp/praktika_setup_env.sh << 'ENV_SETUP_SCRIPT_EOF'
110+
export PYTHONPATH=./ci:.:
111+
cat > ./ci/tmp/workflow_config_vectorsearchstress.json << 'EOF'
112+
${{ needs.config_workflow.outputs.data }}
113+
EOF
114+
cat > ./ci/tmp/workflow_status.json << 'EOF'
115+
${{ toJson(needs) }}
116+
EOF
117+
ENV_SETUP_SCRIPT_EOF
118+
119+
- name: Run
120+
id: run
121+
run: |
122+
. ./ci/tmp/praktika_setup_env.sh
123+
set -o pipefail
124+
if command -v ts &> /dev/null; then
125+
python3 -m praktika run 'Finish Workflow' --workflow "VectorSearchStress" --ci |& ts '[%Y-%m-%d %H:%M:%S]' | tee ./ci/tmp/job.log
126+
else
127+
python3 -m praktika run 'Finish Workflow' --workflow "VectorSearchStress" --ci |& tee ./ci/tmp/job.log
128+
fi

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
*.log
2020
*.debuglog
2121
*.stderr
22+
*.stderr-fatal*
2223
*.stdout
2324

2425
# llvm-xray logs
@@ -167,6 +168,7 @@ tests/queries/0_stateless/*.binary
167168
tests/queries/0_stateless/*.generated-expect
168169
tests/queries/0_stateless/*.expect.history
169170
tests/integration/**/_gen
171+
tests/casa_del_dolor/_instances*
170172

171173
# pytest --pdb history
172174
.pdb_history

.gitmodules

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@
4040
[submodule "contrib/boost"]
4141
path = contrib/boost
4242
url = https://github.com/ClickHouse/boost
43+
[submodule "contrib/arrow"]
44+
path = contrib/arrow
45+
url = https://github.com/ClickHouse/arrow
4346
[submodule "contrib/thrift"]
4447
path = contrib/thrift
4548
url = https://github.com/apache/thrift
@@ -134,9 +137,6 @@
134137
[submodule "contrib/fmtlib"]
135138
path = contrib/fmtlib
136139
url = https://github.com/fmtlib/fmt
137-
[submodule "contrib/sentry-native"]
138-
path = contrib/sentry-native
139-
url = https://github.com/ClickHouse/sentry-native
140140
[submodule "contrib/krb5"]
141141
path = contrib/krb5
142142
url = https://github.com/ClickHouse/krb5
@@ -296,9 +296,6 @@
296296
[submodule "contrib/aws-c-compression"]
297297
path = contrib/aws-c-compression
298298
url = https://github.com/awslabs/aws-c-compression
299-
[submodule "contrib/aws-s2n-tls"]
300-
path = contrib/aws-s2n-tls
301-
url = https://github.com/ClickHouse/s2n-tls
302299
[submodule "contrib/crc32-vpmsum"]
303300
path = contrib/crc32-vpmsum
304301
url = https://github.com/antonblanchard/crc32-vpmsum.git
@@ -372,9 +369,27 @@
372369
[submodule "contrib/SHA3IUF"]
373370
path = contrib/SHA3IUF
374371
url = https://github.com/brainhub/SHA3IUF.git
375-
[submodule "contrib/arrow"]
376-
path = contrib/arrow
377-
url = https://github.com/chdb-io/arrow.git
372+
[submodule "contrib/chdig"]
373+
path = contrib/chdig
374+
url = https://github.com/azat/chdig.git
375+
[submodule "contrib/ai-sdk-cpp"]
376+
path = contrib/ai-sdk-cpp
377+
url = https://github.com/ClickHouse/ai-sdk-cpp
378+
[submodule "contrib/nlohmann-json"]
379+
path = contrib/nlohmann-json
380+
url = https://github.com/nlohmann/json.git
381+
[submodule "contrib/crc32c"]
382+
path = contrib/crc32c
383+
url = https://github.com/google/crc32c.git
384+
[submodule "contrib/simde"]
385+
path = contrib/simde
386+
url = https://github.com/simd-everywhere/simde
387+
[submodule "contrib/FastPFOR"]
388+
path = contrib/FastPFOR
389+
url = https://github.com/fast-pack/FastPFOR
390+
[submodule "contrib/antlr4-cpp-runtime"]
391+
path = contrib/antlr4-cpp-runtime
392+
url = https://github.com/antlr/antlr4.git
378393
[submodule "contrib/utf8proc"]
379394
path = contrib/utf8proc
380395
url = https://github.com/JuliaStrings/utf8proc.git

.snyk

Lines changed: 0 additions & 4 deletions
This file was deleted.

CMakeLists.txt

Lines changed: 40 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ if (SPLIT_DEBUG_SYMBOLS)
234234
set(SPLIT_DEBUG_SYMBOLS_DIR "stripped" CACHE STRING "A separate directory for stripped information")
235235
endif()
236236

237+
option(BUILD_STRIPPED_BINARY "Build stripped binary (clickhouse-stripped)" OFF)
238+
237239
cmake_host_system_information(RESULT AVAILABLE_PHYSICAL_MEMORY QUERY AVAILABLE_PHYSICAL_MEMORY) # Not available under freebsd
238240

239241

@@ -302,9 +304,8 @@ set (CMAKE_C_STANDARD_REQUIRED ON)
302304
# See https://reviews.llvm.org/D112921
303305
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsized-deallocation")
304306

305-
# falign-functions=32 prevents from random performance regressions with the code change. Thus, providing more stable
306-
# benchmarks.
307-
set(COMPILER_FLAGS "${COMPILER_FLAGS} -falign-functions=32")
307+
# falign-functions=64 prevents from random performance regressions with the code change. Thus, providing more stable benchmarks.
308+
set(COMPILER_FLAGS "${COMPILER_FLAGS} -falign-functions=64")
308309

309310
if (ARCH_AMD64)
310311
# align branches within a 32-Byte boundary to avoid the potential performance loss when code layout change,
@@ -381,6 +382,15 @@ elseif (ENABLE_THINLTO)
381382
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot enable ThinLTO")
382383
endif ()
383384

385+
if(COMPILER_PIPE)
386+
set(MAX_COMPILER_MEMORY 2500)
387+
else()
388+
set(MAX_COMPILER_MEMORY 1500)
389+
endif()
390+
set(MAX_LINKER_MEMORY 5000)
391+
include(cmake/limit_jobs.cmake)
392+
393+
384394
# Turns on all external libs like s3, kafka, ODBC, ...
385395
option(ENABLE_LIBRARIES "Enable all external libraries by default" ON)
386396

@@ -402,15 +412,6 @@ endif ()
402412
link_libraries(global-group)
403413
target_link_libraries(global-group INTERFACE $<TARGET_PROPERTY:global-libs,INTERFACE_LINK_LIBRARIES>)
404414

405-
option (ENABLE_GWP_ASAN "Enable Gwp-Asan" OFF)
406-
# We use mmap for allocations more heavily in debug builds,
407-
# but GWP-ASan also wants to use mmap frequently,
408-
# and due to a large number of memory mappings,
409-
# it does not work together well.
410-
# if ((NOT OS_LINUX AND NOT OS_ANDROID) OR (CMAKE_BUILD_TYPE_UC STREQUAL "DEBUG"))
411-
# set(ENABLE_GWP_ASAN OFF)
412-
# endif ()
413-
414415
option (ENABLE_FIU "Enable Fiu" ON)
415416

416417
option(WERROR "Enable -Werror compiler option" ON)
@@ -517,13 +518,32 @@ macro (clickhouse_add_executable target)
517518
add_executable (${ARGV} $<TARGET_OBJECTS:clickhouse_malloc>)
518519
endif ()
519520

521+
# Wrap the malloc/free and other C-style functions with our own ones
522+
# to inject memory tracking mechanism into them.
523+
# Sanitizers have their own way of intercepting the
524+
# allocations and deallocations, so we skip this step for them.
525+
if (NOT (SANITIZE OR SANITIZE_COVERAGE OR OS_DARWIN OR OS_FREEBSD))
526+
target_link_options(${target} PRIVATE
527+
"LINKER:--wrap=malloc"
528+
"LINKER:--wrap=free"
529+
"LINKER:--wrap=calloc"
530+
"LINKER:--wrap=realloc"
531+
"LINKER:--wrap=aligned_alloc"
532+
"LINKER:--wrap=posix_memalign"
533+
"LINKER:--wrap=valloc"
534+
"LINKER:--wrap=memalign"
535+
"LINKER:--wrap=reallocarray"
536+
)
537+
if (NOT USE_MUSL)
538+
target_link_options(${target} PRIVATE
539+
"LINKER:--wrap=pvalloc"
540+
)
541+
endif()
542+
endif()
543+
520544
get_target_property (type ${target} TYPE)
521545
if (${type} STREQUAL EXECUTABLE)
522-
# Disabled if memory tracking is disabled
523-
if (TARGET clickhouse_new_delete)
524-
# operator::new/delete for executables (MemoryTracker stuff)
525-
target_link_libraries (${target} PRIVATE clickhouse_new_delete)
526-
endif()
546+
target_link_libraries (${target} PUBLIC clickhouse_new_delete)
527547

528548
# In case of static jemalloc, because zone_register() is located in zone.c and
529549
# is never used outside (it is declared as constructor) it is omitted
@@ -595,6 +615,9 @@ option(CHECK_LARGE_OBJECT_SIZES "Check that there are no large object files afte
595615

596616
add_subdirectory (base)
597617
add_subdirectory (src)
618+
if (LEXER_STANDALONE_BUILD)
619+
add_subdirectory(tests/lexer)
620+
endif ()
598621
add_subdirectory (programs)
599622
add_subdirectory (utils)
600623

SECURITY.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@ The following versions of ClickHouse server are currently supported with securit
1414

1515
| Version | Supported |
1616
|:-|:-|
17-
| 25.4 | ✔️ |
17+
| 25.7 | ✔️ |
18+
| 25.6 | ✔️ |
19+
| 25.5 | ✔️ |
20+
| 25.4 ||
1821
| 25.3 | ✔️ |
19-
| 25.2 | ✔️ |
22+
| 25.2 | |
2023
| 25.1 ||
2124
| 24.12 ||
2225
| 24.11 ||

base/base/Decimal.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include <base/Decimal.h>
2+
#include <base/defines.h>
23
#include <base/extended_types.h>
34

45
namespace DB
@@ -72,13 +73,15 @@ template <typename T> Decimal<T> operator- (const Decimal<T> & x, const Decimal<
7273
template <typename T> Decimal<T> operator* (const Decimal<T> & x, const Decimal<T> & y) { return x.value * y.value; }
7374
template <typename T> Decimal<T> operator/ (const Decimal<T> & x, const Decimal<T> & y) { return x.value / y.value; }
7475
template <typename T> Decimal<T> operator- (const Decimal<T> & x) { return -x.value; }
76+
template <typename T> Decimal<T> NO_SANITIZE_UNDEFINED negateOverflow (const Decimal<T> & x) { return -x.value; }
7577

7678
#define DISPATCH(TYPE) \
7779
template Decimal<TYPE> operator+ (const Decimal<TYPE> & x, const Decimal<TYPE> & y); \
7880
template Decimal<TYPE> operator- (const Decimal<TYPE> & x, const Decimal<TYPE> & y); \
7981
template Decimal<TYPE> operator* (const Decimal<TYPE> & x, const Decimal<TYPE> & y); \
8082
template Decimal<TYPE> operator/ (const Decimal<TYPE> & x, const Decimal<TYPE> & y); \
81-
template Decimal<TYPE> operator- (const Decimal<TYPE> & x);
83+
template Decimal<TYPE> operator- (const Decimal<TYPE> & x); \
84+
template Decimal<TYPE> NO_SANITIZE_UNDEFINED negateOverflow (const Decimal<TYPE> & x);
8285
FOR_EACH_UNDERLYING_DECIMAL_TYPE(DISPATCH)
8386
#undef DISPATCH
8487

0 commit comments

Comments
 (0)