-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Aggregation Framework, Sharding
-
Fully Compatible
-
ALL
-
v4.4
-
Sharding 2020-03-23, Sharding 2020-04-06, Sharding 2020-04-20
MongosProcessInterface::fieldsHaveSupportingUniqueIndex checks that a unique index exists to support given field paths by sending listIndexes to the primary shard for a namespace. As of SERVER-45103, the primary shard for a sharded collection isn't guaranteed to have correct indexes, so instead listIndexes should be sent with a shard version to a shard that owns at least one chunk. Additionally, for unsharded collections, the listIndexes should be sent with a database version to handle movePrimary.