Commit 33c711c1 authored by Marc Vef's avatar Marc Vef
Browse files

Ignore self mode to be able to ignore na+sm during psm2

parent 001054c8
Loading
Loading
Loading
Loading
+12 −11
Original line number Diff line number Diff line
@@ -235,25 +235,26 @@ void load_hosts() {
        }
    }

    auto addr_cnt = 0;
    for (const auto& id: host_ids) {
        const auto& hostname = hosts.at(id).first;
        const auto& uri = hosts.at(id).second;
        auto id_tmp = id;
        if (gkfs::config::ignore_self) {
            if (hostname == local_hostname)
            if (local_host_id == id)
                break;
        }

            if (id > local_host_id)
                id_tmp--;
        } else {
            if (!local_host_found && hostname == local_hostname) {
                LOG(DEBUG, "Found local host: {}", hostname);
                CTX->local_host_id(id);
                local_host_found = true;
            }
        }

        addrs[addr_cnt] = lookup_endpoint(uri);
        addrs[id_tmp] = lookup_endpoint(uri);

        LOG(DEBUG, "Found peer: {}", addrs[addr_cnt].to_string());
        addr_cnt++;
        LOG(DEBUG, "Found peer: {}", addrs[id_tmp].to_string());
    }

    if (!local_host_found) {