-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Change streams, Sharding
-
None
-
Catalog and Routing
The refineCollectionShardKey command does not cause each of the shards to refresh. This means until the shard happens to refresh its sharding metadata from the config server for another reason, it will continue to use the pre-refined shard key pattern. Oplog entries generated by the replica set shard primary won't include the newly-added suffix fields to the shard key pattern until the shard has refreshed. The documentKey field reported in change events in based on the fields extracted and recorded in the oplog entry and therefore can lead to a sequence where change events after the refineCollectionShardKey change event won't include the newly-added suffix fields to the shard key pattern.