Skip to content

Commit 9606ded

Browse files
authored
Merge pull request ClickHouse#79549 from Algunenano/public_sync_20250424
Sync some files
2 parents 4d92d14 + c7bba6c commit 9606ded

File tree

58 files changed

+182
-49
lines changed

Some content is hidden

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

58 files changed

+182
-49
lines changed

contrib/sparse-checkout/update-aws.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ echo '/src/aws-cpp-sdk-core/*' >> $FILES_TO_CHECKOUT
99
echo '/generated/src/aws-cpp-sdk-s3/*' >> $FILES_TO_CHECKOUT
1010
echo '/generated/src/aws-cpp-sdk-aws/*' >> $FILES_TO_CHECKOUT
1111
echo '/generated/src/aws-cpp-sdk-glue/*' >> $FILES_TO_CHECKOUT
12+
echo '/generated/src/aws-cpp-sdk-kms/*' >> $FILES_TO_CHECKOUT
1213

1314
git config core.sparsecheckout true
1415
git checkout $1

programs/server/config.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,12 @@
292292
<!-- For 'Connection: keep-alive' in HTTP 1.1 -->
293293
<keep_alive_timeout>10</keep_alive_timeout>
294294

295+
<!-- Enable verbose output in /replicas_status handler. -->
296+
<!-- <enable_verbose_replicas_status/>true<enable_verbose_replicas_status>-->
297+
298+
<!-- Enable stacktrace in default http handler. -->
299+
<!-- <enable_http_stacktrace/>true<enable_http_stacktrace>-->
300+
295301
<!-- gRPC protocol (see src/Server/grpc_protos/clickhouse_grpc.proto for the API) -->
296302
<!-- <grpc_port>9100</grpc_port> -->
297303
<grpc>

src/Access/Credentials.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#pragma once
22

3+
#include "config.h"
4+
35
#include <Common/SSHWrapper.h>
46

57
#if USE_SSL
@@ -8,8 +10,6 @@
810

911
#include <base/types.h>
1012

11-
#include "config.h"
12-
1313
namespace Poco::Net
1414
{
1515
class HTTPRequest;

src/Backups/BackupCoordinationReplicatedTables.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ void BackupCoordinationReplicatedTables::prepare() const
290290
for (const auto & [part_name, part_replicas] : table_info.replicas_by_part_name)
291291
{
292292
auto part_info = MergeTreePartInfo::fromPartName(part_name, MERGE_TREE_DATA_MIN_FORMAT_VERSION_WITH_CUSTOM_PARTITIONING);
293-
const auto & partition_id = part_info.getPartitionId();
293+
[[maybe_unused]] const auto & partition_id = part_info.getPartitionId();
294294

295295
auto & min_data_versions_by_partition = table_info.min_data_versions_by_partition;
296296
auto it2 = min_data_versions_by_partition.find(partition_id);

src/Client/Connection.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Connection::Connection(const String & host_, UInt16 port_,
9595
const String & user_, const String & password_,
9696
const String & proto_send_chunked_, const String & proto_recv_chunked_,
9797
[[maybe_unused]] const SSHKey & ssh_private_key_,
98-
const String & jwt_,
98+
[[maybe_unused]] const String & jwt_,
9999
const String & quota_key_,
100100
const String & cluster_,
101101
const String & cluster_secret_,
@@ -110,7 +110,9 @@ Connection::Connection(const String & host_, UInt16 port_,
110110
, ssh_private_key(ssh_private_key_)
111111
#endif
112112
, quota_key(quota_key_)
113+
#if USE_JWT_CPP && USE_SSL
113114
, jwt(jwt_)
115+
#endif
114116
, cluster(cluster_)
115117
, cluster_secret(cluster_secret_)
116118
, client_name(client_name_)
@@ -446,11 +448,13 @@ void Connection::sendHello([[maybe_unused]] const Poco::Timespan & handshake_tim
446448
performHandshakeForSSHAuth(handshake_timeout);
447449
}
448450
#endif
451+
#if USE_JWT_CPP && USE_SSL
449452
else if (!jwt.empty())
450453
{
451454
writeStringBinary(EncodedUserInfo::JWT_AUTHENTICAION_MARKER, *out);
452455
writeStringBinary(jwt, *out);
453456
}
457+
#endif
454458
else
455459
{
456460
writeStringBinary(user, *out);

src/Client/Connection.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,9 @@ class Connection : public IServerConnection
193193
SSHKey ssh_private_key;
194194
#endif
195195
String quota_key;
196+
#if USE_JWT_CPP && USE_SSL
196197
String jwt;
198+
#endif
197199

198200
/// For inter-server authorization
199201
String cluster;

src/Client/ConnectionParameters.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@ ConnectionParameters::ConnectionParameters(const Poco::Util::AbstractConfigurati
7777

7878
if (config.has("jwt"))
7979
{
80+
#if USE_JWT_CPP && USE_SSL
8081
jwt = config.getString("jwt");
82+
#else
83+
throw Exception(ErrorCodes::SUPPORT_IS_DISABLED, "JWT is disabled, because ClickHouse is built without JWT or SSL support");
84+
#endif
8185
}
8286
else if (config.has("ssh-key-file"))
8387
{

src/Common/ZooKeeper/examples/zkutil_test_commands_new_lib.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include <Poco/Event.h>
44
#include <Common/StringUtils.h>
55
#include <Common/ZooKeeper/ZooKeeperImpl.h>
6+
#include <Common/ZooKeeper/ShuffleHost.h>
67
#include <Common/typeid_cast.h>
78
#include <iostream>
89
#include <memory>

src/Common/benchmarks/orc_string_dictionary.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
#include <benchmark/benchmark.h>
77

8+
#include <unordered_map>
9+
810
class OldSortedStringDictionary
911
{
1012
public:

src/Common/config.h.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
#cmakedefine01 USE_PROMETHEUS_PROTOBUFS
7070
#cmakedefine01 USE_MONGODB
7171
#cmakedefine01 USE_NUMACTL
72+
#cmakedefine01 USE_JWT_CPP
7273
#cmakedefine01 USE_FUZZING_MODE
7374
#cmakedefine01 USE_BUZZHOUSE
7475
#cmakedefine01 USE_DELTA_KERNEL_RS

0 commit comments

Comments
 (0)