Skip to content

Commit

Permalink
Merge pull request ClickHouse#55005 from ClickHouse/revert-54399-fix-…
Browse files Browse the repository at this point in the history
…nats-high-cpu-usage

Revert "Fix NATS high cpu usage"
  • Loading branch information
evillique authored Sep 26, 2023
2 parents 5057a31 + 9879066 commit b29e11d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/Storages/NATS/NATSHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ void NATSHandler::startLoop()

while (loop_state.load() == Loop::RUN && duration.count() < MAX_THREAD_WORK_DURATION_MS)
{
uv_run(loop, UV_RUN_DEFAULT);
uv_run(loop, UV_RUN_NOWAIT);
end_time = std::chrono::steady_clock::now();
duration = std::chrono::duration_cast<std::chrono::milliseconds>(end_time - start_time);
}
Expand Down
1 change: 0 additions & 1 deletion src/Storages/NATS/StorageNATS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ StorageNATS::StorageNATS(
}

LOG_DEBUG(log, "Connect attempt #{} failed, error: {}. Reconnecting...", i + 1, nats_GetLastError(nullptr));
std::this_thread::sleep_for(std::chrono::milliseconds(configuration.reconnect_wait));
}
}
catch (...)
Expand Down

0 comments on commit b29e11d

Please sign in to comment.