Address comments

This commit is contained in:
Zhe Wu 2023-09-20 12:55:15 -07:00
parent 31d46b6fb2
commit d65a6a8a10
1 changed files with 3 additions and 4 deletions

View File

@ -3007,10 +3007,9 @@ public:
// if perpetual_storage_wiggle_locality has value and not 0(disabled).
if (!localityKeyValues.empty()) {
for (const auto& [localityKey, localityValue] : localityKeyValues) {
if (self->server_info.count(res.begin()->first)) {
auto server = self->server_info.at(res.begin()->first);
if (self->server_info.count(res.begin()->first)) {
auto server = self->server_info.at(res.begin()->first);
for (const auto& [localityKey, localityValue] : localityKeyValues) {
// Update the wigglingId only if it matches the locality.
if (server->getLastKnownInterface().locality.get(localityKey.get()) == localityValue) {
self->wigglingId = res.begin()->first;