[SERVER-73385] RenameCollectionCoordinator wrongly releases critical section for destination ns. Created: 27/Jan/23  Updated: 29/Oct/23  Resolved: 09/Feb/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.0.0-rc0, 6.3.0-rc1, 6.0.6, 5.0.18

Type: Bug Priority: Major - P3
Reporter: Jordi Serra Torrens Assignee: Pierlauro Sciarelli
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by SERVER-43099 Reenable random chunk migration failp... Closed
Problem/Incident
is caused by SERVER-67325 Collection creation must be disallowe... Closed
is caused by SERVER-67845 Acquire critical section in rename "c... Closed
Assigned Teams:
Sharding EMEA
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.3, v6.0, v5.0
Sprint: Sharding EMEA 2023-02-20
Participants:
Linked BF Score: 135

 Description   

RenameCollectionCoordinator acquires the critical section for the destination ns if it is not sharded. Later, it releases the critical section if the destination ns exists.

This is not okay because it unconditionally releases the critical section on the destination ns, even if it is sharded. It could be that a migration is ongoing for the destination ns (because migrations have not been stopped yet, this happens later) and is in the middle of the critical section. Then rename tries to release it an hits this tassert.



 Comments   
Comment by Githook User [ 21/Apr/23 ]

Author:

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

Message: SERVER-73385 Releasing unheld critical section upon sharded rename error must result in a no-op
Branch: v5.0
https://github.com/mongodb/mongo/commit/e90ae6ab3b5e4e677da55e1648024062140d51b5

Comment by Githook User [ 27/Mar/23 ]

Author:

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

Message: SERVER-73385 Releasing unheld critical section upon sharded rename error must result in a no-op
Branch: v6.0
https://github.com/mongodb/mongo/commit/f7bd247e2c5fad2d712c5a3aa1db1c34aa6b7246

Comment by Githook User [ 13/Feb/23 ]

Author:

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

Message: SERVER-73385 Releasing unheld critical section upon sharded rename error must result in a no-op
Branch: v6.3
https://github.com/mongodb/mongo/commit/09cb75d4c6e020a9e54d6d4f5062ccb7bdcd999e

Comment by Githook User [ 09/Feb/23 ]

Author:

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

Message: SERVER-73385 Releasing unheld critical section upon sharded rename error must result in a no-op
Branch: master
https://github.com/mongodb/mongo/commit/18eca5e99c24ff11210dbfa1a4cdefe8089d76e8

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