[SERVER-82877] shardsvrCreateCollection request should have the same field's type as in 7.0 binary Created: 07/Nov/23  Updated: 17/Nov/23  Resolved: 17/Nov/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 7.2.0-rc0
Fix Version/s: 7.3.0-rc0, 7.2.0-rc2

Type: Bug Priority: Major - P3
Reporter: Enrico Golfieri Assignee: Enrico Golfieri
Resolution: Fixed Votes: 0
Labels: auto-reverted
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Problem/Incident
is caused by SERVER-81188 Embed `createCollection` in sharding ... Closed
Assigned Teams:
Catalog and Routing
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.2
Sprint: CAR Team 2023-11-13, CAR Team 2023-11-27
Participants:
Linked BF Score: 167

 Description   

**
After SERVER-81188 we extended _shardsvrCreateCollection to include the fields of the {create..} command. In order to keep the 2 requests as uniform as possible we changed the type of the field “collation” from “BSONObj” to “Collation” in both shardCollection and _shardsvrCreateCollection.

However, in case of change_streams_downgrade suite on an implicit multiversion variant, we are experiencing many failure due to the following interleaving:

  1. Start case: mongos 7.0 and shard 7.2 with empty collation: Since the variant failing is implicit multiversion we know mongos can be still in 7.0 talking to a 7.2 shard.
  2. Run “shardCollection” : the collation is simply forwarded as set in the original cluster request. The collation can be forwarded as empty bson object and then parsed as Collation object on the shard side. This will apply the default values of the Collation type and being stored in the ddl document as non-empty object.
  3. Case forced step-down: mongos 7.0 and shard 7.0: The collation is now parsed as bson object on the shard side. The non-empty request stored in the ddl document will be loaded as non-empty bson. The original request, now re-tried by the 7.0 mongos will come again as a empty bson, causing the checkIfOptionConflict to fail

This ticket is to revert back the following fields type on _shardsvrCreateCollection:

  • collation from Collation back to object_owned
  • unique from default=false back to optional=true
  • presplitHashedZones from default=false back to optional=true


 Comments   
Comment by Githook User [ 16/Nov/23 ]

Author:

{'name': 'egol', 'email': 'enrico.golfieri@mongodb.com', 'username': 'enricogolfieri'}

Message: SERVER-82877 shardsvrCreateCollection request should have the same field's type as in 7.0 binary
Branch: v7.2
https://github.com/mongodb/mongo/commit/b57eb500c7819fbe3e48578ad101e940d6609b3c

Comment by Githook User [ 15/Nov/23 ]

Author:

{'name': 'egol', 'email': 'enrico.golfieri@mongodb.com', 'username': 'enricogolfieri'}

Message: SERVER-82877 shardsvrCreateCollection request should have the same field's type as in 7.0 binary
Branch: master
https://github.com/mongodb/mongo/commit/391d97d2e93fc94457c83124b90d6f0c9adee4a3

Comment by Githook User [ 11/Nov/23 ]

Author:

{'name': 'Uladzimir Makouski', 'email': 'uladzimir.makouski@mongodb.com', 'username': 'umakouski'}

Message: Revert "SERVER-82877 shardsvrCreateCollection request should have the same field's type as in 7.0 binary"

This reverts commit b8d09cc1fe91344757289a5c9f5903030e0a743e.
Branch: v7.2
https://github.com/mongodb/mongo/commit/b83466d202ece8b350d35d1917c04e23017da2a8

Comment by Githook User [ 10/Nov/23 ]

Author:

{'name': 'auto-revert-processor', 'email': 'dev-prod-dag@mongodb.com', 'username': ''}

Message: Revert "SERVER-82877 shardsvrCreateCollection request should have the same field's type as in 7.0 binary"

This reverts commit 817bd0871e4d269c09c4a7ed009fba790549288e.
Branch: master
https://github.com/mongodb/mongo/commit/7239317bdbc9ac256cd481b578541be0fbc4e948

Comment by Githook User [ 10/Nov/23 ]

Author:

{'name': 'egol', 'email': 'enrico.golfieri@mongodb.com', 'username': 'enricogolfieri'}

Message: SERVER-82877 shardsvrCreateCollection request should have the same field's type as in 7.0 binary
Branch: v7.2
https://github.com/mongodb/mongo/commit/b8d09cc1fe91344757289a5c9f5903030e0a743e

Comment by Githook User [ 10/Nov/23 ]

Author:

{'name': 'egol', 'email': 'enrico.golfieri@mongodb.com', 'username': 'enricogolfieri'}

Message: SERVER-82877 shardsvrCreateCollection request should have the same field's type as in 7.0 binary
Branch: master
https://github.com/mongodb/mongo/commit/817bd0871e4d269c09c4a7ed009fba790549288e

Generated at Thu Feb 08 06:50:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.