-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Change streams, Sharding
-
None
-
Catalog and Routing
-
Fully Compatible
-
ALL
-
CAR Team 2024-11-25
`numInitialChunks` field was not longer supported starting from 7.2 and it has been removed as part of the "shard event" of the change stream.
However in 7.0 numInitialChunks was always sent with a default value of 0.
In case of 7.0 mongos sending a `shardCollection` to a 7.0 shard in a multiversion suite the following tests will fail:
- shard_collection_event.js
- ddl_commits_trigger_placement_op_entries.js
The 2 tests do a strict comparison between the bson object received by the change stream and bson object expected by the test.
To counter that, in SERVER-82877 a special check has been added that removes the `numInitialChunks` from the event coming from the change stream.
Once 8.0 becomes last lts, we know numInitialChunks is guaranteed not to be part of the change stream and we can safely remove the check.
The same applies for the field `capped` which was added to _shardsvrCreateCollection in SERVER-81188 with default value false.