0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 09:06:21 +01:00

SERVER-56950 Avoid shardRegistry reload infinite loop when overlapping with setFCV

This commit is contained in:
Simon Gratzer 2021-05-20 18:48:38 +02:00 committed by Evergreen Agent
parent 400e776707
commit 5ffdb69a0d

View File

@ -349,7 +349,13 @@ private:
return !(*this == other);
}
bool operator>(const Time& other) const {
return topologyTime > other.topologyTime || rsmIncrement > other.rsmIncrement ||
// SERVER-56950: When setFCV(v4.4) overlaps with a ShardRegistry reload,
// the ShardRegistry can fall into an infinite loop of lookups
if ((!topologyTime.isNull() && !other.topologyTime.isNull()) &&
(topologyTime > other.topologyTime)) {
return true;
}
return rsmIncrement > other.rsmIncrement ||
forceReloadIncrement > other.forceReloadIncrement;
}
bool operator>=(const Time& other) const {