diff --git a/fdbserver/ConfigFollowerInterface.cpp b/fdbserver/ConfigFollowerInterface.cpp index 1bb9b424be..d95f772d85 100644 --- a/fdbserver/ConfigFollowerInterface.cpp +++ b/fdbserver/ConfigFollowerInterface.cpp @@ -41,6 +41,9 @@ ConfigFollowerInterface::ConfigFollowerInterface(NetworkAddress const& remote) rollforward(Endpoint::wellKnown({ remote }, WLTOKEN_CONFIGFOLLOWER_ROLLFORWARD)), getCommittedVersion(Endpoint::wellKnown({ remote }, WLTOKEN_CONFIGFOLLOWER_GETCOMMITTEDVERSION)) {} +ConfigFollowerInterface::ConfigFollowerInterface(Hostname const& remote) + : _id(deterministicRandom()->randomUniqueID()), hostname(remote) {} + bool ConfigFollowerInterface::operator==(ConfigFollowerInterface const& rhs) const { return _id == rhs._id; } diff --git a/fdbserver/ConfigFollowerInterface.h b/fdbserver/ConfigFollowerInterface.h index 9191e1aac0..67137d86b2 100644 --- a/fdbserver/ConfigFollowerInterface.h +++ b/fdbserver/ConfigFollowerInterface.h @@ -221,7 +221,7 @@ public: ConfigFollowerInterface(); void setupWellKnownEndpoints(); ConfigFollowerInterface(NetworkAddress const& remote); - ConfigFollowerInterface(Hostname hostname) : hostname(hostname) {} + ConfigFollowerInterface(Hostname const& hostname); bool operator==(ConfigFollowerInterface const& rhs) const; bool operator!=(ConfigFollowerInterface const& rhs) const; UID id() const { return _id; }