Skip to content

Commit 0e8e12d

Browse files
committed
Sync private
1 parent 89501ed commit 0e8e12d

File tree

5 files changed

+37
-4
lines changed

5 files changed

+37
-4
lines changed

src/Common/CurrentMetrics.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@
337337
M(DistrCacheRegisteredServers, "Number of distributed cache registered servers") \
338338
M(DistrCacheRegisteredServersCurrentAZ, "Number of distributed cache registered servers in current az") \
339339
M(DistrCacheServerS3CachedClients, "Number of distributed cache S3 cached clients") \
340+
M(DistrCacheServerRegistryConnections, "Number of active connections to ClickHouse server from Distributed Cache (not marked as cancelled because of limit)") \
340341
\
341342
M(SchedulerIOReadScheduled, "Number of IO reads are being scheduled currently") \
342343
M(SchedulerIOWriteScheduled, "Number of IO writes are being scheduled currently") \
@@ -389,6 +390,9 @@
389390
\
390391
M(TotalMergeFailures, "Number of all failed merges since startup, including the ones that were aborted") \
391392
M(NonAbortedMergeFailures, "Number of failed merges since startup, excluding the merges that were aborted") \
393+
M(StatelessWorkerThreads, "Number of threads in the stateless worker thread pool.") \
394+
M(StatelessWorkerThreadsActive, "Number of threads in the stateless worker thread pool running a task.") \
395+
M(StatelessWorkerThreadsScheduled, "Number of queued or active jobs in the stateless worker thread pool.") \
392396

393397
#ifdef APPLY_FOR_EXTERNAL_METRICS
394398
#define APPLY_FOR_METRICS(M) APPLY_FOR_BUILTIN_METRICS(M) APPLY_FOR_EXTERNAL_METRICS(M)

src/Common/ProfileEvents.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,6 @@ The server successfully detected this situation and will download merged part fr
829829
M(DistrCachePrecomputeRangesMicroseconds, "Distributed Cache read buffer event. Time spent to precompute read ranges", ValueType::Microseconds) \
830830
M(DistrCacheNextImplMicroseconds, "Distributed Cache read buffer event. Time spend in ReadBufferFromDistributedCache::nextImpl", ValueType::Microseconds) \
831831
M(DistrCacheStartRangeMicroseconds, "Distributed Cache read buffer event. Time spent to start a new read range with distributed cache", ValueType::Microseconds) \
832-
M(DistrCacheIgnoredBytesWhileWaitingProfileEvents, "Distributed Cache read buffer event. Ignored bytes while waiting for profile events in distributed cache", ValueType::Number) \
833832
M(DistrCacheRangeChange, "Distributed Cache read buffer event. Number of times we changed read range because of seek/last_position change", ValueType::Number) \
834833
M(DistrCacheRangeResetBackward, "Distributed Cache read buffer event. Number of times we reset read range because of seek/last_position change", ValueType::Number) \
835834
M(DistrCacheRangeResetForward, "Distributed Cache read buffer event. Number of times we reset read range because of seek/last_position change", ValueType::Number) \
@@ -842,17 +841,16 @@ The server successfully detected this situation and will download merged part fr
842841
M(DistrCacheReceiveResponseErrors, "Distributed Cache client event. Number of distributed cache errors when receiving response a request", ValueType::Number) \
843842
\
844843
M(DistrCachePackets, "Distributed Cache client event. Total number of packets received from distributed cache", ValueType::Number) \
845-
M(DistrCachePacketsBytes, "Distributed Cache client event. The number of bytes in Data packets which were not ignored", ValueType::Bytes) \
844+
M(DistrCacheDataPacketsBytes, "Distributed Cache client event. The number of bytes in Data packets which were not ignored", ValueType::Bytes) \
846845
M(DistrCacheUnusedPackets, "Distributed Cache client event. Number of skipped unused packets from distributed cache", ValueType::Number) \
847-
M(DistrCacheUnusedPacketsBytes, "Distributed Cache client event. The number of bytes in Data packets which were ignored", ValueType::Bytes) \
846+
M(DistrCacheUnusedDataPacketsBytes, "Distributed Cache client event. The number of bytes in Data packets which were ignored", ValueType::Bytes) \
848847
M(DistrCacheUnusedPacketsBufferAllocations, "Distributed Cache client event. The number of extra buffer allocations in case we could not reuse existing buffer", ValueType::Number) \
849848
\
850849
M(DistrCacheLockRegistryMicroseconds, "Distributed Cache registry event. Time spent to take DistributedCacheRegistry lock", ValueType::Microseconds) \
851850
M(DistrCacheRegistryUpdateMicroseconds, "Distributed Cache registry event. Time spent updating distributed cache registry", ValueType::Microseconds) \
852851
M(DistrCacheRegistryUpdates, "Distributed Cache registry event. Number of distributed cache registry updates", ValueType::Number) \
853852
M(DistrCacheHashRingRebuilds, "Distributed Cache registry event. Number of distributed cache hash ring rebuilds", ValueType::Number) \
854853
\
855-
M(DistrCacheReadBytesFromCache, "Distributed Cache read buffer event. Bytes read from distributed cache", ValueType::Bytes) \
856854
M(DistrCacheReadBytesFromFallbackBuffer, "Distributed Cache read buffer event. Bytes read from fallback buffer", ValueType::Number) \
857855
\
858856
M(DistrCacheOpenedConnections, "Distributed Cache connection event. The number of open connections to distributed cache", ValueType::Number) \

src/Core/ServerSettings.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,6 +1060,7 @@ The policy on how to perform a scheduling of CPU slots specified by `concurrent_
10601060
DECLARE(UInt64, os_cpu_busy_time_threshold, 1'000'000, "Threshold of OS CPU busy time in microseconds (OSCPUVirtualTimeMicroseconds metric) to consider CPU doing some useful work, no CPU overload would be considered if busy time was below this value.", 0) \
10611061
DECLARE(Float, min_os_cpu_wait_time_ratio_to_drop_connection, 10.0, "Min ratio between OS CPU wait (OSCPUWaitMicroseconds metric) and busy (OSCPUVirtualTimeMicroseconds metric) times to consider dropping connections. Linear interpolation between min and max ratio is used to calculate the probability, the probability is 0 at this point.", 0) \
10621062
DECLARE(Float, max_os_cpu_wait_time_ratio_to_drop_connection, 20.0, "Max ratio between OS CPU wait (OSCPUWaitMicroseconds metric) and busy (OSCPUVirtualTimeMicroseconds metric) times to consider dropping connections. Linear interpolation between min and max ratio is used to calculate the probability, the probability is 1 at this point.", 0) \
1063+
DECLARE(Float, distributed_cache_keep_up_free_connections_ratio, 0.1f, "Soft limit for number of active connection distributed cache will try to keep free. After the number of free connections goes below distributed_cache_keep_up_free_connections_ratio * max_connections, connections with oldest activity will be closed until the number goes above the limit.", 0) \
10631064

10641065

10651066
// clang-format on

src/Core/Settings.cpp

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6639,6 +6639,30 @@ Enable PRQL - an alternative to SQL.
66396639
)", EXPERIMENTAL) \
66406640
DECLARE(Bool, enable_adaptive_memory_spill_scheduler, false, R"(
66416641
Trigger processor to spill data into external storage adpatively. grace join is supported at present.
6642+
)", EXPERIMENTAL) \
6643+
DECLARE(Bool, make_distributed_plan, false, R"(
6644+
Make distributed query plan.
6645+
)", EXPERIMENTAL) \
6646+
DECLARE(Bool, execute_distributed_plan_locally, false, R"(
6647+
Run all tasks of a distributed query plan locally. Useful for testing and debugging.
6648+
)", EXPERIMENTAL) \
6649+
DECLARE(UInt64, default_shuffle_join_bucket_count, 8, R"(
6650+
Default number of buckets for distributed shuffle-hash-join.
6651+
)", EXPERIMENTAL) \
6652+
DECLARE(UInt64, default_reader_bucket_count, 8, R"(
6653+
Default number of tasks for parallel reading in distributed query. Tasks are spread across between replicas.
6654+
)", EXPERIMENTAL) \
6655+
DECLARE(Bool, optimize_exchanges, false, R"(
6656+
Removes unnecessary exchanges in distributed query plan. Disable it for debugging.
6657+
)", EXPERIMENTAL) \
6658+
DECLARE(String, force_exchange_kind, "", R"(
6659+
Force specified kind of Exchange operators between distributed query stages.
6660+
6661+
Possible values:
6662+
6663+
- '' - do not force any kind of Exchange operators, let the optimizer choose,
6664+
- 'Persisted' - use temporary files in object storage,
6665+
- 'Streaming' - stream exchange data over network.
66426666
)", EXPERIMENTAL) \
66436667
\
66446668
/** Experimental tsToGrid aggregate function. */ \

src/Core/SettingsChangesHistory.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ const VersionToSettingsChangesMap & getSettingsChangesHistory()
9090
{"allow_experimental_correlated_subqueries", false, false, "Added new setting to allow correlated subqueries execution."},
9191
{"serialize_query_plan", false, false, "NewSetting"},
9292
{"allow_experimental_shared_set_join", 0, 1, "A setting for ClickHouse Cloud to enable SharedSet and SharedJoin"},
93+
{"make_distributed_plan", 0, 0, "New experimental setting."},
94+
{"execute_distributed_plan_locally", 0, 0, "New experimental setting."},
95+
{"default_shuffle_join_bucket_count", 8, 8, "New experimental setting."},
96+
{"default_reader_bucket_count", 8, 8, "New experimental setting."},
97+
{"optimize_exchanges", 0, 0, "New experimental setting."},
98+
{"force_exchange_kind", "", "", "New experimental setting."},
9399
{"allow_special_bool_values_inside_variant", true, false, "Don't allow special bool values during Variant type parsing"},
94100
{"cast_string_to_variant_use_inference", true, true, "New setting to enable/disable types inference during CAST from String to Variant"},
95101
{"distributed_cache_read_request_max_tries", 20, 20, "New setting"},

0 commit comments

Comments
 (0)