-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
DB Integration & Observability
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Search needs to know whether the cluster that mongot serves is sharded. If mongot's syncSource.router setting doesn't match the cluster's actual topology, mongot can silently delete existing search indexes or create duplicate catalog collections in __mdb_internal_search. For example, this happens when a replica set is converted to a sharded cluster but mongot's config isn't updated accordingly. CLOUDP-404954 adds a catalog access guard that blocks catalog access when the configuration and topology don't match.
As a workaround today, mongot polls getCmdLineOpts against mongod once per minute and caches the result (meaning the cached value can be up to a minute stale)
We should consider adding a getter to MongoExtensionHostServices that returns the node's cluster topology, maybe as an enum like {replica set, shard, config shard, router}, or just as a sharded/unsharded flag.