Skip to content

Commit 71f8937

Browse files
committed
Merge branch 'master' into system-error-log
2 parents 9784580 + 180ada0 commit 71f8937

File tree

274 files changed

+7030
-3727
lines changed

Some content is hidden

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

274 files changed

+7030
-3727
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@ At a minimum, the following information should be added (but add more as needed)
4848
- [ ] <!---ci_include_stateful--> Allow: Stateful tests
4949
- [ ] <!---ci_include_integration--> Allow: Integration Tests
5050
- [ ] <!---ci_include_performance--> Allow: Performance tests
51-
- [ ] <!---ci_set_normal_builds--> Allow: Normal Builds
52-
- [ ] <!---ci_set_special_builds--> Allow: Special Builds
53-
- [ ] <!---ci_set_non_required--> Allow: All NOT Required Checks
51+
- [ ] <!---ci_set_builds--> Allow: All Builds
5452
- [ ] <!---batch_0_1--> Allow: batch 1, 2 for multi-batch jobs
5553
- [ ] <!---batch_2_3--> Allow: batch 3, 4, 5, 6 for multi-batch jobs
5654
---
@@ -61,6 +59,7 @@ At a minimum, the following information should be added (but add more as needed)
6159
- [ ] <!---ci_exclude_aarch64|release|debug--> Exclude: All with aarch64, release, debug
6260
---
6361
- [ ] <!---do_not_test--> Do not test
62+
- [ ] <!---woolen_wolfdog--> Woolen Wolfdog
6463
- [ ] <!---upload_all--> Upload binaries for special builds
6564
- [ ] <!---no_merge_commit--> Disable merge-commit
6665
- [ ] <!---no_ci_cache--> Disable CI cache

.github/workflows/backport_branches.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
if: ${{ !failure() && !cancelled() }}
7171
uses: ./.github/workflows/reusable_test.yml
7272
with:
73-
test_name: Compatibility check (amd64)
73+
test_name: Compatibility check (release)
7474
runner_type: style-checker
7575
data: ${{ needs.RunConfig.outputs.data }}
7676
CompatibilityCheckAarch64:
@@ -194,7 +194,7 @@ jobs:
194194
if: ${{ !failure() && !cancelled() }}
195195
uses: ./.github/workflows/reusable_test.yml
196196
with:
197-
test_name: Install packages (amd64)
197+
test_name: Install packages (release)
198198
runner_type: style-checker
199199
data: ${{ needs.RunConfig.outputs.data }}
200200
run_command: |
@@ -204,7 +204,7 @@ jobs:
204204
if: ${{ !failure() && !cancelled() }}
205205
uses: ./.github/workflows/reusable_test.yml
206206
with:
207-
test_name: Install packages (arm64)
207+
test_name: Install packages (aarch64)
208208
runner_type: style-checker-aarch64
209209
data: ${{ needs.RunConfig.outputs.data }}
210210
run_command: |

.github/workflows/master.yml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -104,36 +104,26 @@ jobs:
104104
with:
105105
stage: Tests_2
106106
data: ${{ needs.RunConfig.outputs.data }}
107-
# stage for jobs that do not prohibit merge
108107
Tests_3:
109108
# Test_3 should not wait for Test_1/Test_2 and should not be blocked by them on master branch since all jobs need to run there.
110-
needs: [RunConfig, Builds_1, Builds_2]
109+
needs: [RunConfig, Builds_1]
111110
if: ${{ !failure() && !cancelled() && contains(fromJson(needs.RunConfig.outputs.data).stages_data.stages_to_do, 'Tests_3') }}
112111
uses: ./.github/workflows/reusable_test_stage.yml
113112
with:
114113
stage: Tests_3
115114
data: ${{ needs.RunConfig.outputs.data }}
116115

117116
################################# Reports #################################
118-
# Reports should be run even if Builds_1/2 failed - put them separately in wf (not in Tests_1/2)
119-
Builds_1_Report:
117+
# Reports should run even if Builds_1/2 fail - run them separately, not in Tests_1/2/3
118+
Builds_Report:
120119
# run report check for failed builds to indicate the CI error
121120
if: ${{ !cancelled() && needs.RunConfig.result == 'success' && contains(fromJson(needs.RunConfig.outputs.data).jobs_data.jobs_to_do, 'ClickHouse build check') }}
122-
needs: [RunConfig, Builds_1]
121+
needs: [RunConfig, Builds_1, Builds_2]
123122
uses: ./.github/workflows/reusable_test.yml
124123
with:
125124
test_name: ClickHouse build check
126125
runner_type: style-checker-aarch64
127126
data: ${{ needs.RunConfig.outputs.data }}
128-
Builds_2_Report:
129-
# run report check for failed builds to indicate the CI error
130-
if: ${{ !cancelled() && needs.RunConfig.result == 'success' && contains(fromJson(needs.RunConfig.outputs.data).jobs_data.jobs_to_do, 'ClickHouse special build check') }}
131-
needs: [RunConfig, Builds_2]
132-
uses: ./.github/workflows/reusable_test.yml
133-
with:
134-
test_name: ClickHouse special build check
135-
runner_type: style-checker-aarch64
136-
data: ${{ needs.RunConfig.outputs.data }}
137127

138128
MarkReleaseReady:
139129
if: ${{ !failure() && !cancelled() }}
@@ -165,7 +155,7 @@ jobs:
165155
166156
FinishCheck:
167157
if: ${{ !cancelled() }}
168-
needs: [RunConfig, Builds_1, Builds_2, Builds_1_Report, Builds_2_Report, Tests_1, Tests_2, Tests_3]
158+
needs: [RunConfig, Builds_1, Builds_2, Builds_Report, Tests_1, Tests_2, Tests_3]
169159
runs-on: [self-hosted, style-checker-aarch64]
170160
steps:
171161
- name: Check out repository code

.github/workflows/pull_request.yml

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -126,46 +126,38 @@ jobs:
126126
with:
127127
stage: Builds_2
128128
data: ${{ needs.RunConfig.outputs.data }}
129+
# stage for running non-required checks without being blocked by required checks (Test_1) if corresponding settings is selected
129130
Tests_2:
130-
needs: [RunConfig, Builds_2]
131+
needs: [RunConfig, Builds_1]
131132
if: ${{ !failure() && !cancelled() && contains(fromJson(needs.RunConfig.outputs.data).stages_data.stages_to_do, 'Tests_2') }}
132133
uses: ./.github/workflows/reusable_test_stage.yml
133134
with:
134135
stage: Tests_2
135136
data: ${{ needs.RunConfig.outputs.data }}
136-
# stage for jobs that do not prohibit merge
137137
Tests_3:
138-
needs: [RunConfig, Builds_1, Tests_1, Builds_2, Tests_2]
138+
needs: [RunConfig, Builds_1, Tests_1]
139139
if: ${{ !failure() && !cancelled() && contains(fromJson(needs.RunConfig.outputs.data).stages_data.stages_to_do, 'Tests_3') }}
140140
uses: ./.github/workflows/reusable_test_stage.yml
141141
with:
142142
stage: Tests_3
143143
data: ${{ needs.RunConfig.outputs.data }}
144144

145145
################################# Reports #################################
146-
# Reports should by run even if Builds_1/2 fail, so put them separately in wf (not in Tests_1/2)
147-
Builds_1_Report:
146+
# Reports should run even if Builds_1/2 fail - run them separately (not in Tests_1/2/3)
147+
Builds_Report:
148148
# run report check for failed builds to indicate the CI error
149-
if: ${{ !cancelled() && needs.StyleCheck.result == 'success' && contains(fromJson(needs.RunConfig.outputs.data).jobs_data.jobs_to_do, 'ClickHouse build check') }}
150-
needs: [RunConfig, StyleCheck, Builds_1]
149+
if: ${{ !cancelled() && needs.RunConfig.result == 'success' && contains(fromJson(needs.RunConfig.outputs.data).jobs_data.jobs_to_do, 'ClickHouse build check') }}
150+
needs: [RunConfig, StyleCheck, Builds_1, Builds_2]
151151
uses: ./.github/workflows/reusable_test.yml
152152
with:
153153
test_name: ClickHouse build check
154154
runner_type: style-checker-aarch64
155155
data: ${{ needs.RunConfig.outputs.data }}
156-
Builds_2_Report:
157-
# run report check for failed builds to indicate the CI error
158-
if: ${{ !cancelled() && needs.StyleCheck.result == 'success' && contains(fromJson(needs.RunConfig.outputs.data).jobs_data.jobs_to_do, 'ClickHouse special build check') }}
159-
needs: [RunConfig, StyleCheck, Builds_2]
160-
uses: ./.github/workflows/reusable_test.yml
161-
with:
162-
test_name: ClickHouse special build check
163-
runner_type: style-checker-aarch64
164-
data: ${{ needs.RunConfig.outputs.data }}
165156

166157
CheckReadyForMerge:
167158
if: ${{ !cancelled() && needs.StyleCheck.result == 'success' }}
168-
needs: [RunConfig, BuildDockers, StyleCheck, FastTest, Builds_1, Builds_2, Builds_1_Report, Builds_2_Report, Tests_1, Tests_2]
159+
# Test_2 or Test_3 must not have jobs required for Mergeable check
160+
needs: [RunConfig, BuildDockers, StyleCheck, FastTest, Builds_1, Builds_2, Builds_Report, Tests_1]
169161
runs-on: [self-hosted, style-checker-aarch64]
170162
steps:
171163
- name: Check out repository code
@@ -181,7 +173,7 @@ jobs:
181173
#
182174
FinishCheck:
183175
if: ${{ !cancelled() }}
184-
needs: [RunConfig, BuildDockers, StyleCheck, FastTest, Builds_1, Builds_2, Builds_1_Report, Builds_2_Report, Tests_1, Tests_2, Tests_3]
176+
needs: [RunConfig, BuildDockers, StyleCheck, FastTest, Builds_1, Builds_2, Builds_Report, Tests_1, Tests_2, Tests_3]
185177
runs-on: [self-hosted, style-checker-aarch64]
186178
steps:
187179
- name: Check out repository code
@@ -204,8 +196,7 @@ jobs:
204196
concurrency:
205197
group: jepsen
206198
if: ${{ !failure() && !cancelled() && contains(fromJson(needs.RunConfig.outputs.data).jobs_data.jobs_to_do, 'ClickHouse Keeper Jepsen') }}
207-
# jepsen needs binary_release build which is in Builds_2
208-
needs: [RunConfig, Builds_2]
199+
needs: [RunConfig, Builds_1]
209200
uses: ./.github/workflows/reusable_test.yml
210201
with:
211202
test_name: ClickHouse Keeper Jepsen

.github/workflows/release_branches.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
if: ${{ !failure() && !cancelled() }}
6666
uses: ./.github/workflows/reusable_test.yml
6767
with:
68-
test_name: Compatibility check (amd64)
68+
test_name: Compatibility check (release)
6969
runner_type: style-checker
7070
data: ${{ needs.RunConfig.outputs.data }}
7171
CompatibilityCheckAarch64:
@@ -244,7 +244,7 @@ jobs:
244244
if: ${{ !failure() && !cancelled() }}
245245
uses: ./.github/workflows/reusable_test.yml
246246
with:
247-
test_name: Install packages (amd64)
247+
test_name: Install packages (release)
248248
runner_type: style-checker
249249
data: ${{ needs.RunConfig.outputs.data }}
250250
run_command: |
@@ -254,7 +254,7 @@ jobs:
254254
if: ${{ !failure() && !cancelled() }}
255255
uses: ./.github/workflows/reusable_test.yml
256256
with:
257-
test_name: Install packages (arm64)
257+
test_name: Install packages (aarch64)
258258
runner_type: style-checker-aarch64
259259
data: ${{ needs.RunConfig.outputs.data }}
260260
run_command: |

base/poco/Crypto/src/OpenSSLInitializer.cpp

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@
2323
#include <openssl/conf.h>
2424
#endif
2525

26-
#if __has_feature(address_sanitizer)
27-
#include <sanitizer/lsan_interface.h>
28-
#endif
2926

3027
using Poco::RandomInputStream;
3128
using Poco::Thread;
@@ -70,27 +67,21 @@ void OpenSSLInitializer::initialize()
7067
SSL_library_init();
7168
SSL_load_error_strings();
7269
OpenSSL_add_all_algorithms();
73-
70+
7471
char seed[SEEDSIZE];
7572
RandomInputStream rnd;
7673
rnd.read(seed, sizeof(seed));
77-
{
78-
# if __has_feature(address_sanitizer)
79-
/// Leak sanitizer (part of address sanitizer) thinks that a few bytes of memory in OpenSSL are allocated during but never released.
80-
__lsan::ScopedDisabler lsan_disabler;
81-
#endif
82-
RAND_seed(seed, SEEDSIZE);
83-
}
84-
74+
RAND_seed(seed, SEEDSIZE);
75+
8576
int nMutexes = CRYPTO_num_locks();
8677
_mutexes = new Poco::FastMutex[nMutexes];
8778
CRYPTO_set_locking_callback(&OpenSSLInitializer::lock);
8879
// Not needed on Windows (see SF #110: random unhandled exceptions when linking with ssl).
8980
// https://sourceforge.net/p/poco/bugs/110/
9081
//
9182
// From http://www.openssl.org/docs/crypto/threads.html :
92-
// "If the application does not register such a callback using CRYPTO_THREADID_set_callback(),
93-
// then a default implementation is used - on Windows and BeOS this uses the system's
83+
// "If the application does not register such a callback using CRYPTO_THREADID_set_callback(),
84+
// then a default implementation is used - on Windows and BeOS this uses the system's
9485
// default thread identifying APIs"
9586
CRYPTO_set_id_callback(&OpenSSLInitializer::id);
9687
CRYPTO_set_dynlock_create_callback(&OpenSSLInitializer::dynlockCreate);
@@ -109,7 +100,7 @@ void OpenSSLInitializer::uninitialize()
109100
CRYPTO_set_locking_callback(0);
110101
CRYPTO_set_id_callback(0);
111102
delete [] _mutexes;
112-
103+
113104
CONF_modules_free();
114105
}
115106
}

base/poco/Foundation/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ target_compile_definitions (_poco_foundation
213213
)
214214

215215
target_include_directories (_poco_foundation SYSTEM PUBLIC "include")
216+
target_link_libraries (_poco_foundation PRIVATE clickhouse_common_io)
216217

217218
target_link_libraries (_poco_foundation
218219
PRIVATE

base/poco/Foundation/include/Poco/ThreadPool.h

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,28 @@ class Foundation_API ThreadPool
4848
/// from the pool.
4949
{
5050
public:
51-
ThreadPool(int minCapacity = 2, int maxCapacity = 16, int idleTime = 60, int stackSize = POCO_THREAD_STACK_SIZE);
51+
explicit ThreadPool(
52+
int minCapacity = 2,
53+
int maxCapacity = 16,
54+
int idleTime = 60,
55+
int stackSize = POCO_THREAD_STACK_SIZE,
56+
size_t global_profiler_real_time_period_ns_ = 0,
57+
size_t global_profiler_cpu_time_period_ns_ = 0);
5258
/// Creates a thread pool with minCapacity threads.
5359
/// If required, up to maxCapacity threads are created
5460
/// a NoThreadAvailableException exception is thrown.
5561
/// If a thread is running idle for more than idleTime seconds,
5662
/// and more than minCapacity threads are running, the thread
5763
/// is killed. Threads are created with given stack size.
5864

59-
ThreadPool(
60-
const std::string & name, int minCapacity = 2, int maxCapacity = 16, int idleTime = 60, int stackSize = POCO_THREAD_STACK_SIZE);
65+
explicit ThreadPool(
66+
const std::string & name,
67+
int minCapacity = 2,
68+
int maxCapacity = 16,
69+
int idleTime = 60,
70+
int stackSize = POCO_THREAD_STACK_SIZE,
71+
size_t global_profiler_real_time_period_ns_ = 0,
72+
size_t global_profiler_cpu_time_period_ns_ = 0);
6173
/// Creates a thread pool with the given name and minCapacity threads.
6274
/// If required, up to maxCapacity threads are created
6375
/// a NoThreadAvailableException exception is thrown.
@@ -171,6 +183,8 @@ class Foundation_API ThreadPool
171183
int _serial;
172184
int _age;
173185
int _stackSize;
186+
size_t _globalProfilerRealTimePeriodNs;
187+
size_t _globalProfilerCPUTimePeriodNs;
174188
ThreadVec _threads;
175189
mutable FastMutex _mutex;
176190
};

0 commit comments

Comments
 (0)