[SERVER-71120] Collection creation within aggregations do not serialize with critical section Created: 07/Nov/22  Updated: 29/Oct/23  Resolved: 20/Dec/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 6.1.0-rc0
Fix Version/s: 6.3.0-rc0

Type: Bug Priority: Major - P3
Reporter: Tommaso Tocci Assignee: Paolo Polato
Resolution: Fixed Votes: 0
Labels: shardingemea-qw
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Problem/Incident
is caused by SERVER-67633 Serialise explicit/implicit createCol... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.2
Sprint: Sharding EMEA 2022-12-12, Sharding EMEA 2022-12-26
Participants:
Story Points: 7.5

 Description   

In SERVER-67633 we made that create collection operations serialize with the collection critical section if present. In particular in order to achieve so we made that the mongos always add shard version UNSHARDED to the create collection request that is being forwarded to the shard.
The problem is that we forget about collection creation path that can happen during aggregation execution.

This means that collection creation that happens as part of aggregation execution will ignore the critical section

The goal of this ticket is to:

  • Fix the executeCommandOnDatabasePrimary. The cmdObjWithShardVersion variable is never used.
  • Ensure all creation path use the executeCommandOnDatabasePrimary wrapper and properly attach the shard version UNSHARDED.


 Comments   
Comment by Githook User [ 20/Dec/22 ]

Author:

{'name': 'Paolo Polato', 'email': 'paolo.polato@mongodb.com', 'username': 'ppolato'}

Message: SERVER-71120 Fix serialisation of collection created within aggregations
Branch: master
https://github.com/mongodb/mongo/commit/bd7dac53bbae3910b31ef7fb02dbcb75f70abcb0

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