Merge pull request #65896 from ClickHouse/backport/24.5/65819

Backport #65819 to 24.5: Respect cgroup CPU limit in Keeper
This commit is contained in:
robot-clickhouse-ci-2 2024-07-01 11:23:44 +02:00 committed by GitHub
commit 6ff2ab162f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,11 +7,12 @@
#include <mutex>
#include <string>
#include <Coordination/KeeperLogStore.h>
#include <Coordination/KeeperSnapshotManagerS3.h>
#include <Coordination/KeeperStateMachine.h>
#include <Coordination/KeeperStateManager.h>
#include <Coordination/KeeperSnapshotManagerS3.h>
#include <Coordination/LoggerWrapper.h>
#include <Coordination/WriteBufferFromNuraftBuffer.h>
#include <Disks/DiskLocal.h>
#include <IO/ReadHelpers.h>
#include <IO/WriteHelpers.h>
#include <boost/algorithm/string.hpp>
@ -27,7 +28,7 @@
#include <Common/LockMemoryExceptionInThread.h>
#include <Common/Stopwatch.h>
#include <Common/getMultipleKeysFromConfig.h>
#include <Disks/DiskLocal.h>
#include <Common/getNumberOfPhysicalCPUCores.h>
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#include <fmt/chrono.h>
@ -365,6 +366,8 @@ void KeeperServer::launchRaftServer(const Poco::Util::AbstractConfiguration & co
LockMemoryExceptionInThread::removeUniqueLock();
};
asio_opts.thread_pool_size_ = getNumberOfPhysicalCPUCores();
if (state_manager->isSecure())
{
#if USE_SSL