mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Merge pull request #34523 from bigo-sg/nolockappendentries
Keeper no lock on append_entries
This commit is contained in:
commit
db245cfbc9
@ -286,11 +286,8 @@ RaftAppendResult KeeperServer::putRequestBatch(const KeeperStorage::RequestsForS
|
||||
for (const auto & [session_id, request] : requests_for_sessions)
|
||||
entries.push_back(getZooKeeperLogEntry(session_id, request));
|
||||
|
||||
{
|
||||
std::lock_guard lock(append_entries_mutex);
|
||||
return raft_instance->append_entries(entries);
|
||||
}
|
||||
}
|
||||
|
||||
bool KeeperServer::isLeader() const
|
||||
{
|
||||
|
@ -28,8 +28,6 @@ private:
|
||||
nuraft::ptr<nuraft::asio_service> asio_service;
|
||||
nuraft::ptr<nuraft::rpc_listener> asio_listener;
|
||||
|
||||
std::mutex append_entries_mutex;
|
||||
|
||||
std::mutex initialized_mutex;
|
||||
std::atomic<bool> initialized_flag = false;
|
||||
std::condition_variable initialized_cv;
|
||||
|
Loading…
Reference in New Issue
Block a user