From ff0fd655e9700a87cbac07c2f77727905d8fe64e Mon Sep 17 00:00:00 2001 From: Anton Myagkov Date: Thu, 11 Jul 2024 15:24:18 +0200 Subject: [PATCH] issue-1394: TryUpdateDevices refactoring (#1578) Issue #1394 Previous pull request #1476 was merged without addressing several comments: 1. Rename agentsMap to agentsSet 2. use GetAgentId() instead of agentid() --- .../libs/storage/disk_registry/disk_registry_state.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cloud/blockstore/libs/storage/disk_registry/disk_registry_state.cpp b/cloud/blockstore/libs/storage/disk_registry/disk_registry_state.cpp index 3611a7fc99..386db8383a 100644 --- a/cloud/blockstore/libs/storage/disk_registry/disk_registry_state.cpp +++ b/cloud/blockstore/libs/storage/disk_registry/disk_registry_state.cpp @@ -3650,18 +3650,18 @@ TVector TDiskRegistryState::TryUpdateDevices( TVector ret; ret.reserve(uuids.size()); - TSet agentsMap; + TSet agentsSet; for (const auto& uuid: uuids) { auto [agent, device] = FindDeviceLocation(uuid); if (!agent || !device) { continue; } ret.push_back(uuid); - agentsMap.emplace(agent->agentid()); + agentsSet.emplace(agent->GetAgentId()); AdjustDeviceIfNeeded(*device, now); } - for (const auto& agentId: agentsMap) { + for (const auto& agentId: agentsSet) { auto* agent = AgentList.FindAgent(agentId); if (!agent) { continue;