Skip to content

Commit b24a3d5

Browse files
Merge branch 'master' of github.com:ClickHouse/ClickHouse into fix-pretty-glue
2 parents 718c16c + 125202b commit b24a3d5

File tree

128 files changed

+2447
-3463
lines changed

Some content is hidden

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

128 files changed

+2447
-3463
lines changed

docs/en/sql-reference/formats.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ sidebar_position: 50
44
sidebar_label: 'Input and Output Formats'
55
title: 'Formats for Input and Output Data'
66
description: 'Supported input and output formats'
7+
hide_title: true
78
---
89

910
import Content from '../interfaces/formats.md';

docs/en/sql-reference/functions/geo/s2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description: 'Documentation for functions for working with S2 indexes'
99

1010
## S2Index {#s2index}
1111

12-
[S2](https://s2geometry.io/) is a geographical indexing system where all geographical data is represented on a three-dimensional sphere (similar to a globe).
12+
[S2](https://s2geometry.io/) is a geographical indexing system where all geographical data is represented on a sphere (similar to a globe).
1313

1414
In the S2 library points are represented as the S2 Index - a specific number which encodes internally a point on the surface of a unit sphere, unlike traditional (latitude, longitude) pairs. To get the S2 point index for a given point specified in the format (latitude, longitude) use the [geoToS2](#geotos2) function. Also, you can use the [s2ToGeo](#s2togeo) function for getting geographical coordinates corresponding to the specified S2 point index.
1515

src/Client/LocalConnection.cpp

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -466,23 +466,6 @@ bool LocalConnection::poll(size_t)
466466
return true;
467467
}
468468

469-
// pushing executors have to be finished before the final stats are sent
470-
if (state->is_finished)
471-
{
472-
if (state->executor)
473-
{
474-
// no op
475-
}
476-
else if (state->pushing_async_executor)
477-
{
478-
state->pushing_async_executor->finish();
479-
}
480-
else if (state->pushing_executor)
481-
{
482-
state->pushing_executor->finish();
483-
}
484-
}
485-
486469
if (state->is_finished && !state->sent_totals)
487470
{
488471
state->sent_totals = true;
@@ -531,7 +514,7 @@ bool LocalConnection::poll(size_t)
531514
{
532515
state->sent_profile_events = true;
533516

534-
if (send_profile_events && (state->executor || state->pushing_async_executor || state->pushing_executor))
517+
if (send_profile_events && state->executor)
535518
{
536519
sendProfileEvents();
537520
return true;

src/Common/ErrorCodes.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,6 @@
625625
M(743, ICEBERG_SPECIFICATION_VIOLATION) \
626626
M(744, SESSION_ID_EMPTY) \
627627
M(745, SERVER_OVERLOADED) \
628-
M(746, DEPENDENCIES_NOT_FOUND) \
629628
\
630629
M(900, DISTRIBUTED_CACHE_ERROR) \
631630
M(901, CANNOT_USE_DISTRIBUTED_CACHE) \

src/Common/Exception.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -593,15 +593,15 @@ void tryLogException(std::exception_ptr e, const char * log_name, const std::str
593593
}
594594
}
595595

596-
void tryLogException(std::exception_ptr e, LoggerPtr logger, const std::string & start_of_message, LogsLevel level)
596+
void tryLogException(std::exception_ptr e, LoggerPtr logger, const std::string & start_of_message)
597597
{
598598
try
599599
{
600600
std::rethrow_exception(std::move(e)); // NOLINT
601601
}
602602
catch (...)
603603
{
604-
tryLogCurrentException(logger, start_of_message, level);
604+
tryLogCurrentException(logger, start_of_message);
605605
}
606606
}
607607

src/Common/Exception.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ struct ExecutionStatus
326326

327327
/// TODO: Logger leak constexpr overload
328328
void tryLogException(std::exception_ptr e, const char * log_name, const std::string & start_of_message = "");
329-
void tryLogException(std::exception_ptr e, LoggerPtr logger, const std::string & start_of_message = "", LogsLevel level = LogsLevel::error);
329+
void tryLogException(std::exception_ptr e, LoggerPtr logger, const std::string & start_of_message = "");
330330
void tryLogException(std::exception_ptr e, const AtomicLogger & logger, const std::string & start_of_message = "");
331331

332332
std::string getExceptionMessage(const Exception & e, bool with_stacktrace, bool check_embedded_stacktrace = false);

src/Common/Logger.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Logger;
1414
using LoggerPtr = std::shared_ptr<Logger>;
1515
}
1616

17-
using LoggerPtr = Poco::LoggerPtr;
17+
using LoggerPtr = std::shared_ptr<Poco::Logger>;
1818
using LoggerRawPtr = Poco::Logger *;
1919

2020
/** RAII wrappers around Poco/Logger.h.

src/Common/LoggingFormatStringHelpers.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,20 +90,18 @@ LogSeriesLimiter::LogSeriesLimiter(LoggerPtr logger_, size_t allowed_count_, tim
9090
}
9191

9292
time_t now = time(nullptr);
93+
static const time_t cleanup_delay_s = 600;
94+
time_t cutoff_time = now - cleanup_delay_s; // entries older than this are stale
95+
9396
UInt128 name_hash = sipHash128(logger->name().c_str(), logger->name().size());
9497

9598
std::lock_guard lock(mutex);
9699

97-
if (last_cleanup == 0)
98-
last_cleanup = now;
99-
100100
auto & series_records = getSeriesRecords();
101101

102-
static const time_t cleanup_delay_s = 600;
103-
if (last_cleanup + cleanup_delay_s >= now)
102+
if (last_cleanup < cutoff_time) // will also be triggered when last_cleanup is zero
104103
{
105-
time_t old = now - cleanup_delay_s;
106-
std::erase_if(series_records, [old](const auto & elem) { return get<0>(elem.second) < old; });
104+
std::erase_if(series_records, [cutoff_time](const auto & elem) { return get<0>(elem.second) < cutoff_time; });
107105
last_cleanup = now;
108106
}
109107

src/Common/MemorySpillScheduler.h

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

33
#include <atomic>
4-
#include <memory>
54
#include <mutex>
65
#include <unordered_map>
76
#include <base/types.h>
@@ -22,8 +21,6 @@ struct ProcessorMemoryStats
2221
class MemorySpillScheduler
2322
{
2423
public:
25-
using Ptr = std::shared_ptr<MemorySpillScheduler>;
26-
2724
explicit MemorySpillScheduler(bool enable_ = false) : enable(enable_) {}
2825
~MemorySpillScheduler() = default;
2926

src/Common/ThreadStatus.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ static thread_local bool has_alt_stack = false;
107107

108108
ThreadGroup::ThreadGroup()
109109
: master_thread_id(CurrentThread::get().thread_id)
110-
, memory_spill_scheduler(std::make_shared<MemorySpillScheduler>(false))
110+
, memory_spill_scheduler(false)
111111
{}
112112

113113
ThreadStatus::ThreadStatus(bool check_current_thread_on_destruction_)

0 commit comments

Comments
 (0)