From bd6d765b8336fb854be2933f33b38518ce5ac544 Mon Sep 17 00:00:00 2001
From: Renxuan Wang <renxuan@apple.com>
Date: Thu, 7 Apr 2022 22:30:04 -0700
Subject: [PATCH] Fix ConfigFollowerInterface constructor.

---
 fdbserver/ConfigFollowerInterface.cpp | 3 +++
 fdbserver/ConfigFollowerInterface.h   | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

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; }