Skip to content

Commit b43bda0

Browse files
committed
Merge remote-tracking branch 'origin/master' into simplify_lwd_projection_drop_logic
2 parents f728183 + 673d5c4 commit b43bda0

File tree

276 files changed

+6783
-1805
lines changed

Some content is hidden

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

276 files changed

+6783
-1805
lines changed

.github/workflows/create_release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,10 @@ jobs:
135135
./utils/list-versions/update-docker-version.sh
136136
echo "Generate ChangeLog"
137137
export CI=1
138+
docker pull clickhouse/style-test:latest
138139
docker run -u "${UID}:${GID}" -e PYTHONUNBUFFERED=1 -e CI=1 --network=host \
139140
--volume=".:/wd" --workdir="/wd" \
140-
clickhouse/style-test \
141+
clickhouse/style-test:latest \
141142
./tests/ci/changelog.py -v --debug-helpers \
142143
--gh-user-or-token ${{ secrets.ROBOT_CLICKHOUSE_COMMIT_TOKEN }} \
143144
--jobs=5 \

CHANGELOG.md

Lines changed: 163 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,16 @@ Please feel free to reach out to tyler `<at>` clickhouse `<dot>` com.
4747
You can also peruse [ClickHouse Events](https://clickhouse.com/company/news-events) for a list of all upcoming trainings, meetups, speaking engagements, etc.
4848

4949
Upcoming meetups
50-
* [Tokyo Meetup with Confluent](https://www.meetup.com/clickhouse-tokyo-user-group/events/306832118/) - April 15, 2025
51-
* [Kuala Lumper Meetup with CNCF](https://www.meetup.com/clickhouse-malaysia-meetup-group/events/306697678/) - April 16, 2025
5250
* [Jakarta Meetup with AWS](https://www.meetup.com/clickhouse-indonesia-user-group/events/306973747/) - April 22, 2025
5351
* [Denver Meetup](https://www.meetup.com/clickhouse-denver-user-group/events/306934991/) - April 23, 2025
5452
* [Austin Meetup](https://www.meetup.com/clickhouse-austin-user-group/events/307289908) - May 13, 2025
5553
* [London Meetup](https://www.meetup.com/clickhouse-london-user-group/events/306047172/) - May 14, 2025
5654
* [Istanbul Meetup](https://www.meetup.com/clickhouse-turkiye-meetup-group/events/306978337/) - May 15, 2025
55+
* [Shenzhen Meetup](hhttps://www.huodongxing.com/event/7803892350511) - May 17, 2025
5756

5857
Recent meetups
58+
* [Kuala Lumper Meetup with CNCF](https://www.meetup.com/clickhouse-malaysia-meetup-group/events/306697678/) - April 16, 2025
59+
* [Tokyo Meetup with Confluent](https://www.meetup.com/clickhouse-tokyo-user-group/events/306832118/) - April 15, 2025
5960
* [Ho Chi Minh Meetup with AWS & Infinite Lambda](https://www.meetup.com/clickhouse-vietnam-meetup-group/events/306810105/) - April 12, 2025
6061
* [Oslo Meetup](https://www.meetup.com/open-source-real-time-data-warehouse-real-time-analytics/events/306414327/) - April 8, 2025
6162
* [Sydney Meetup](https://www.meetup.com/clickhouse-australia-user-group/events/306549810/) - April 1, 2025

base/poco/NetSSL_OpenSSL/include/Poco/Net/SecureSocketImpl.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,16 +236,21 @@ namespace Net
236236
/// to be able to re-use it again.
237237

238238
private:
239+
using MutexT = Poco::FastMutex;
240+
using LockT = MutexT::ScopedLock;
241+
using UnLockT = Poco::ScopedLockWithUnlock<MutexT>;
242+
239243
SecureSocketImpl(const SecureSocketImpl &);
240244
SecureSocketImpl & operator=(const SecureSocketImpl &);
241245

242246
mutable std::recursive_mutex _mutex;
243-
SSL * _pSSL; // GUARDED_BY _mutex
247+
std::atomic<SSL *> _pSSL;
244248
Poco::AutoPtr<SocketImpl> _pSocket;
245249
Context::Ptr _pContext;
246250
bool _needHandshake;
247251
std::string _peerHostName;
248252
Session::Ptr _pSession;
253+
mutable MutexT _ssl_mutex;
249254

250255
friend class SecureStreamSocketImpl;
251256

base/poco/NetSSL_OpenSSL/src/SecureSocketImpl.cpp

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ void SecureSocketImpl::acceptSSL()
103103
std::lock_guard<std::recursive_mutex> lock(_mutex);
104104
poco_assert (!_pSSL);
105105

106+
LockT l(_ssl_mutex);
107+
106108
BIO* pBIO = BIO_new(BIO_s_socket());
107109
if (!pBIO) throw SSLException("Cannot create BIO object");
108110
BIO_set_fd(pBIO, static_cast<int>(_pSocket->sockfd()), BIO_NOCLOSE);
@@ -169,6 +171,8 @@ void SecureSocketImpl::connectSSL(bool performHandshake)
169171
poco_assert (!_pSSL);
170172
poco_assert (_pSocket->initialized());
171173

174+
LockT l(_ssl_mutex);
175+
172176
BIO* pBIO = BIO_new(BIO_s_socket());
173177
if (!pBIO) throw SSLException("Cannot create SSL BIO object");
174178
BIO_set_fd(pBIO, static_cast<int>(_pSocket->sockfd()), BIO_NOCLOSE);
@@ -246,6 +250,8 @@ void SecureSocketImpl::shutdown()
246250
std::lock_guard<std::recursive_mutex> lock(_mutex);
247251
if (_pSSL)
248252
{
253+
UnLockT l(_ssl_mutex);
254+
249255
// Don't shut down the socket more than once.
250256
int shutdownState = SSL_get_shutdown(_pSSL);
251257
bool shutdownSent = (shutdownState & SSL_SENT_SHUTDOWN) == SSL_SENT_SHUTDOWN;
@@ -260,6 +266,7 @@ void SecureSocketImpl::shutdown()
260266
// done with it.
261267
int rc = SSL_shutdown(_pSSL);
262268
if (rc < 0) handleError(rc);
269+
l.unlock();
263270
if (_pSocket->getBlocking())
264271
{
265272
_pSocket->shutdown();
@@ -290,6 +297,9 @@ int SecureSocketImpl::sendBytes(const void* buffer, int length, int flags)
290297
poco_check_ptr (_pSSL);
291298

292299
int rc;
300+
301+
LockT l(_ssl_mutex);
302+
293303
if (_needHandshake)
294304
{
295305
rc = completeHandshake();
@@ -331,6 +341,8 @@ int SecureSocketImpl::receiveBytes(void* buffer, int length, int flags)
331341
poco_assert (_pSocket->initialized());
332342
poco_check_ptr (_pSSL);
333343

344+
LockT l(_ssl_mutex);
345+
334346
/// Special case: just check that we can read from socket
335347
if ((flags & MSG_DONTWAIT) && (flags & MSG_PEEK))
336348
return _pSocket->receiveBytes(buffer, length, flags);
@@ -368,6 +380,8 @@ int SecureSocketImpl::available() const
368380
std::lock_guard<std::recursive_mutex> lock(_mutex);
369381
poco_check_ptr (_pSSL);
370382

383+
LockT l(_ssl_mutex);
384+
371385
return SSL_pending(_pSSL);
372386
}
373387

@@ -464,10 +478,20 @@ bool SecureSocketImpl::isLocalHost(const std::string& hostName)
464478
X509* SecureSocketImpl::peerCertificate() const
465479
{
466480
std::lock_guard<std::recursive_mutex> lock(_mutex);
481+
LockT l(_ssl_mutex);
482+
483+
X509* pCert = nullptr;
484+
467485
if (_pSSL)
468-
return SSL_get1_peer_certificate(_pSSL);
469-
else
470-
return 0;
486+
{
487+
pCert = ::SSL_get_peer_certificate(_pSSL);
488+
489+
if (X509_V_OK != SSL_get_verify_result(_pSSL))
490+
throw CertificateValidationException("SecureSocketImpl::peerCertificate(): "
491+
"Certificate verification error " + Utility::getLastError());
492+
}
493+
494+
return pCert;
471495
}
472496

473497
Poco::Timespan SecureSocketImpl::getMaxTimeoutOrLimit()
@@ -608,6 +632,8 @@ void SecureSocketImpl::reset()
608632
close();
609633
if (_pSSL)
610634
{
635+
LockT l(_ssl_mutex);
636+
611637
SSL_free(_pSSL);
612638
_pSSL = nullptr;
613639
}
@@ -652,9 +678,12 @@ bool SecureSocketImpl::sessionWasReused()
652678
{
653679
std::lock_guard<std::recursive_mutex> lock(_mutex);
654680
if (_pSSL)
655-
return SSL_session_reused(_pSSL) != 0;
656-
else
657-
return false;
681+
{
682+
LockT l(_ssl_mutex);
683+
return ::SSL_session_reused(_pSSL) != 0;
684+
}
685+
686+
return false;
658687
}
659688

660689
void SecureSocketImpl::setBlocking(bool flag)

ci/docker/style-test/requirements.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@ yamllint==1.26.3
33
codespell==2.2.1
44
mypy==1.15.0
55
pylint==3.1.0
6+
# required for change log generation:
7+
tqdm==4.67.1
8+
thefuzz==0.22.1
9+
PyGitHub==2.6.1
10+
boto3==1.37.38

ci/jobs/scripts/check_style/aspell-ignore/en/aspell-dict.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1728,6 +1728,7 @@ distinctdynamictypes
17281728
distinctjsonpaths
17291729
distro
17301730
divideDecimal
1731+
divideOrNull
17311732
dmesg
17321733
doesnt
17331734
domainRFC
@@ -1887,8 +1888,10 @@ geospatial
18871888
getClientHTTPHeader
18881889
getMacro
18891890
getMaxTableNameLengthForDatabase
1891+
getMergeTreeSetting
18901892
getOSKernelVersion
18911893
getServerPort
1894+
getServerSetting
18921895
getSetting
18931896
getSettingOrDefault
18941897
getSizeOfEnumType
@@ -2036,6 +2039,7 @@ inodes
20362039
instantiation
20372040
instantiations
20382041
intDiv
2042+
intDivOrNull
20392043
intDivOrZero
20402044
intExp
20412045
intHash
@@ -2233,6 +2237,7 @@ mebibytes
22332237
memtable
22342238
memtables
22352239
mergeTreeIndex
2240+
mergeTreeProjection
22362241
mergeable
22372242
mergetree
22382243
messageID
@@ -2261,6 +2266,7 @@ mmap
22612266
mmapped
22622267
modularization
22632268
moduli
2269+
moduloOrNull
22642270
moduloOrZero
22652271
mongoc
22662272
mongocxx
@@ -2473,6 +2479,7 @@ positionCaseInsensitive
24732479
positionCaseInsensitiveUTF
24742480
positionUTF
24752481
positiveModulo
2482+
positiveModuloOrNull
24762483
postfix
24772484
postfixes
24782485
postgres

ci/jobs/scripts/check_style/check-settings-style

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ function add_setting_declaration_file()
5555
fi
5656
filename=$(basename -- "$1")
5757
filename="${filename%.*}"
58-
grep "DECLARE(" "$1" | awk -vfilename="${filename}" '{print substr($2, 0, length($2) - 1) " " filename substr($1, 9, length($1) - 9) " SettingsDeclaration" }' >> "${SETTINGS_FILE}"
58+
grep -e "DECLARE(" "$1" | awk -vfilename="${filename}" '{print substr($2, 0, length($2) - 1) " " filename substr($1, 9, length($1) - 9) " SettingsDeclaration" }' >> "${SETTINGS_FILE}"
59+
grep -e "DECLARE_WITH_ALIAS(" "$1" | awk -vfilename="${filename}" '{print substr($2, 0, length($2) - 1) " " filename substr($1, 20, length($1) - 20) " SettingsDeclaration" }' >> "${SETTINGS_FILE}"
5960
}
6061

6162
for settings_file in ${ALL_DECLARATION_FILES};

ci/jobs/scripts/workflow_hooks/filter_job.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,18 @@ def should_skip_job(job_name):
8383
f"Skipped, labeled with '{Labels.CI_FUNCTIONAL_FLAKY}' - run stateless test jobs only",
8484
)
8585

86-
if Labels.CI_INTEGRATION in _info_cache.pr_labels and (
86+
if Labels.CI_INTEGRATION in _info_cache.pr_labels and not (
8787
job_name.startswith(JobNames.INTEGRATION) or job_name in JobConfigs.builds_for_tests
8888
):
8989
return (
9090
True,
9191
f"Skipped, labeled with '{Labels.CI_INTEGRATION}' - run integration test jobs only",
9292
)
9393

94-
if Labels.CI_FUNCTIONAL in _info_cache.pr_labels and (
94+
if Labels.CI_FUNCTIONAL in _info_cache.pr_labels and not (
9595
job_name.startswith(JobNames.STATELESS)
96-
or job_name.startswith(JobNames.STATEFUL or job_name in JobConfigs.builds_for_tests)
96+
or job_name.startswith(JobNames.STATEFUL)
97+
or job_name in JobConfigs.builds_for_tests
9798
):
9899
return (
99100
True,

contrib/arrow

0 commit comments

Comments
 (0)