[SERVER-61026] Invert order of shards receiving drop collection participant command Created: 27/Oct/21  Updated: 29/Oct/23  Resolved: 27/Oct/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 5.0.3, 5.1.0-rc2
Fix Version/s: 5.2.0, 5.0.4, 5.1.0-rc3

Type: Task 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
Related
related to SERVER-61933 Interleaved operations during sharded... Backlog
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.1, v5.0
Participants:

 Description   

Both drop database and drop collection coordinators are sending the drop participant command first to the primary shard and then to the others.

As a result, the current behavior permits to see the following change stream events (thanks max.hirschhorn for pointing that out):

  1. drop change event from primary shard
  2. insert change event from primary shard (unsharded collection implicitly recreated)
  3. drop change event from other shard

It would be difficult for a client to know whether the insert (2) happened during or after the drop. Inverting the order would prevent such interleaving of events.



 Comments   
Comment by Githook User [ 28/Oct/21 ]

Author:

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

Message: SERVER-61026 Invert order of shards receiving drop collection participant command
Branch: v5.0
https://github.com/mongodb/mongo/commit/92cd5d41f66a87f8bc1dca77613f98103d2419a0

Comment by Githook User [ 28/Oct/21 ]

Author:

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

Message: SERVER-61026 Invert order of shards receiving drop collection participant command
Branch: v5.1
https://github.com/mongodb/mongo/commit/1a192eb1ed4dc0f3c2be3afb2cc79e50eae81ebc

Comment by Githook User [ 27/Oct/21 ]

Author:

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

Message: SERVER-61026 Invert order of shards receiving drop collection participant command
Branch: master
https://github.com/mongodb/mongo/commit/f977f696a5179cbf36d49e55dcbd0bd6a8d7b975

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