[SERVER-59756] ShardServerProcessInterface's rename must synchronize with DDL operations Created: 02/Sep/21  Updated: 29/Oct/23  Resolved: 21/Sep/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 5.1.0, 5.0.3
Fix Version/s: 5.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Pierlauro Sciarelli Assignee: Pierlauro Sciarelli
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.0
Participants:

 Description   

ShardServerProcessInterface::renameIfOptionsAndIndexesHaveNotChanged is totally bypassing the DDL coordinator infrastructure and is currently only used for the $out stage.

Such stage requires a collection parameter and works as follows:

  1. User issues an aggregation including an $out stage with output collection db.outColl
  2. During the aggregation, documents are written to a temporary collection db.tmp.coll
  3. At the end of the aggregation, the temporary collection is renamed to db.coll by calling renameIfOptionsAndIndexesHaveNotChanged.

As a result, if any DDL is invoked on db.coll concurrently with the rename happening at point (3), both local and sharding catalog can end up in an inconsistent state.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 21/Sep/21 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: Revert "SERVER-59756 ShardServerProcessInterface's rename must synchronize with DDL operations"

This reverts commit 5b219afdb1745464d75a902007764111b97e001f.
Branch: v5.0
https://github.com/mongodb/mongo/commit/5fa7b277cdd63318c26941eee53e0bd499298461

Comment by Githook User [ 21/Sep/21 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-59756 update fcv test reference due to backport
Branch: v5.0
https://github.com/mongodb/mongo/commit/2bfdedd5da8f4eedef8f9434b3392a10ed02cae8

Comment by Githook User [ 20/Sep/21 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-59756 ShardServerProcessInterface's rename must synchronize with DDL operations
Branch: v5.0
https://github.com/mongodb/mongo/commit/5b219afdb1745464d75a902007764111b97e001f

Comment by Githook User [ 10/Sep/21 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-59756 ShardServerProcessInterface's rename must synchronize with DDL operations
Branch: master
https://github.com/mongodb/mongo/commit/35dd7411084701594e0912be7964c18d06886baf

Comment by Githook User [ 03/Sep/21 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-59756 temporarily disable shardCollection stage in agg_out.js and add TODOs
Branch: master
https://github.com/mongodb/mongo/commit/9dd736dc7e0de59898a9239d9c031d1473a80c27

Generated at Thu Feb 08 05:48:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.