mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Fix style
This commit is contained in:
parent
f2acc366f7
commit
0958d0b168
@ -559,14 +559,13 @@ void ReplicatedMergeTreePartCheckThread::run()
|
||||
});
|
||||
if (selected == parts_queue.end())
|
||||
{
|
||||
// find next part to check in the queue and schedule the check
|
||||
// otherwise, scheduled for later checks won't be executed until a new check is enqueued (i.e. task is scheduled again)
|
||||
auto next_it =
|
||||
std::min_element(begin(parts_queue), end(parts_queue),
|
||||
[](const auto &l, const auto &r) {
|
||||
return l.time < r.time;
|
||||
});
|
||||
if (next_it != parts_queue.end()) {
|
||||
// Find next part to check in the queue and schedule the check
|
||||
// Otherwise, scheduled for later checks won't be executed until
|
||||
// a new check is enqueued (i.e. task is scheduled again)
|
||||
auto next_it = std::min_element(
|
||||
begin(parts_queue), end(parts_queue), [](const auto & l, const auto & r) { return l.time < r.time; });
|
||||
if (next_it != parts_queue.end())
|
||||
{
|
||||
auto delay = next_it->time - current_time;
|
||||
task->scheduleAfter(delay * 1000);
|
||||
}
|
||||
|
@ -90,9 +90,10 @@ private:
|
||||
Poco::Logger * log;
|
||||
|
||||
using StringSet = std::set<String>;
|
||||
struct PartToCheck {
|
||||
String name;
|
||||
time_t time;
|
||||
struct PartToCheck
|
||||
{
|
||||
String name;
|
||||
time_t time;
|
||||
};
|
||||
using PartsToCheckQueue = std::list<PartToCheck>;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user