Skip to content

Commit ebe0e3c

Browse files
committed
- Do not add fdbserver processes to the client list.
Note: Server processes started getting reported as clients since 7.1.0 (not sure if this change in behavior was intentional or not), and this breaks the operator upgrade logic.
1 parent 0be35b5 commit ebe0e3c

File tree

5 files changed

+15
-8
lines changed

5 files changed

+15
-8
lines changed

fdbclient/MonitorLeader.actor.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,8 @@ ACTOR Future<MonitorLeaderInfo> monitorProxiesOneGeneration(
844844
Reference<AsyncVar<Optional<ClientLeaderRegInterface>>> coordinator,
845845
MonitorLeaderInfo info,
846846
Reference<ReferencedObject<Standalone<VectorRef<ClientVersionRef>>>> supportedVersions,
847-
Key traceLogGroup) {
847+
Key traceLogGroup,
848+
IsInternal internal) {
848849
state ClusterConnectionString cs = info.intermediateConnRecord->getConnectionString();
849850
state int coordinatorsSize = cs.hostnames.size() + cs.coords.size();
850851
state int index = 0;
@@ -878,6 +879,7 @@ ACTOR Future<MonitorLeaderInfo> monitorProxiesOneGeneration(
878879
req.knownClientInfoID = clientInfo->get().id;
879880
req.supportedVersions = supportedVersions->get();
880881
req.traceLogGroup = traceLogGroup;
882+
req.internal = internal;
881883

882884
state ClusterConnectionString storedConnectionString;
883885
if (connRecord) {
@@ -985,13 +987,14 @@ ACTOR Future<Void> monitorProxies(
985987
Reference<AsyncVar<ClientDBInfo>> clientInfo,
986988
Reference<AsyncVar<Optional<ClientLeaderRegInterface>>> coordinator,
987989
Reference<ReferencedObject<Standalone<VectorRef<ClientVersionRef>>>> supportedVersions,
988-
Key traceLogGroup) {
990+
Key traceLogGroup,
991+
IsInternal internal) {
989992
state MonitorLeaderInfo info(connRecord->get());
990993
loop {
991994
ASSERT(connRecord->get().isValid());
992995
choose {
993996
when(MonitorLeaderInfo _info = wait(monitorProxiesOneGeneration(
994-
connRecord->get(), clientInfo, coordinator, info, supportedVersions, traceLogGroup))) {
997+
connRecord->get(), clientInfo, coordinator, info, supportedVersions, traceLogGroup, internal))) {
995998
info = _info;
996999
}
9971000
when(wait(connRecord->onChange())) {

fdbclient/NativeAPI.actor.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2281,7 +2281,8 @@ Database Database::createDatabase(Reference<IClusterConnectionRecord> connRecord
22812281
clientInfo,
22822282
coordinator,
22832283
networkOptions.supportedVersions,
2284-
StringRef(networkOptions.traceLogGroup));
2284+
StringRef(networkOptions.traceLogGroup),
2285+
internal);
22852286

22862287
DatabaseContext* db;
22872288
if (preallocatedDb) {

fdbclient/include/fdbclient/CoordinationInterface.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ struct OpenDatabaseCoordRequest {
265265
std::vector<Hostname> hostnames;
266266
std::vector<NetworkAddress> coordinators;
267267
ReplyPromise<CachedSerialization<struct ClientDBInfo>> reply;
268+
bool internal{ true };
268269

269270
bool verify() const { return true; }
270271

@@ -278,7 +279,8 @@ struct OpenDatabaseCoordRequest {
278279
clusterKey,
279280
coordinators,
280281
reply,
281-
hostnames);
282+
hostnames,
283+
internal);
282284
}
283285
};
284286

fdbclient/include/fdbclient/MonitorLeader.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ Future<Void> monitorProxies(
8585
Reference<AsyncVar<ClientDBInfo>> const& clientInfo,
8686
Reference<AsyncVar<Optional<ClientLeaderRegInterface>>> const& coordinator,
8787
Reference<ReferencedObject<Standalone<VectorRef<ClientVersionRef>>>> const& supportedVersions,
88-
Key const& traceLogGroup);
88+
Key const& traceLogGroup,
89+
IsInternal const& internal);
8990

9091
void shrinkProxyList(ClientDBInfo& ni,
9192
std::vector<UID>& lastCommitProxyUIDs,

fdbserver/Coordination.actor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ ACTOR Future<Void> openDatabase(ClientData* db,
226226
++(*clientCount);
227227
hasConnectedClients->set(true);
228228

229-
if (req.supportedVersions.size() > 0) {
229+
if (req.supportedVersions.size() > 0 && !req.internal) {
230230
db->clientStatusInfoMap[req.reply.getEndpoint().getPrimaryAddress()] =
231231
ClientStatusInfo(req.traceLogGroup, req.supportedVersions, req.issues);
232232
}
@@ -252,7 +252,7 @@ ACTOR Future<Void> openDatabase(ClientData* db,
252252
}
253253
}
254254

255-
if (req.supportedVersions.size() > 0) {
255+
if (req.supportedVersions.size() > 0 && !req.internal) {
256256
db->clientStatusInfoMap.erase(req.reply.getEndpoint().getPrimaryAddress());
257257
}
258258

0 commit comments

Comments
 (0)