[SERVER-56418] Make ReshardingDonorService renaming robust on failover Created: 27/Apr/21  Updated: 29/Oct/23  Resolved: 13/May/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 5.0.0-rc0

Type: Task Priority: Major - P3
Reporter: Haley Connelly Assignee: Max Hirschhorn
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Problem/Incident
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2021-05-17
Participants:
Linked BF Score: 161
Story Points: 1

 Description   

If the following events were to occur, resharding would incorrectly fail
(1) Suppose the donor is a recipient as well as donor and in kBlockingWrites
(2) The donor renames the collection - no more temporaryNss collection
(3) Before it can persist its decision to kDone, a failover occurs
(4) Donor steps up, still in kBlockingWrites
(5) The donor tries to rename the temporary collection again. it fails with NamespaceNotFound since the temporaryNss was already renamed before the failover.



 Comments   
Comment by Githook User [ 12/May/21 ]

Author:

{'name': 'Max Hirschhorn', 'email': 'max.hirschhorn@mongodb.com', 'username': 'visemet'}

Message: SERVER-56418 Re-add isAlsoRecipient ReshardingDonorService test cases.

This reverts commit 7f88224e8248ad30bcbe86a81a46a193b081db9c.
Branch: master
https://github.com/mongodb/mongo/commit/68c7a019b3aef351a25499a6bdfb812e27f946cc

Comment by Githook User [ 12/May/21 ]

Author:

{'name': 'Max Hirschhorn', 'email': 'max.hirschhorn@mongodb.com', 'username': 'visemet'}

Message: SERVER-56418 Reset reached state on begin PauseDuringStateTransitions.
Branch: master
https://github.com/mongodb/mongo/commit/add1a7ef0ae1146f4ebd04b6bc0a0db30093726f

Comment by Githook User [ 11/May/21 ]

Author:

{'name': 'Max Hirschhorn', 'email': 'max.hirschhorn@mongodb.com', 'username': 'visemet'}

Message: SERVER-56418 Revert resharding_donor_service_test.cpp test changes.

This reverts the resharding_donor_service_test.cpp changes from commit
bdc6725265d3fdcaf5984ced835cb53c3b3946f8.
Branch: master
https://github.com/mongodb/mongo/commit/7f88224e8248ad30bcbe86a81a46a193b081db9c

Comment by Githook User [ 10/May/21 ]

Author:

{'name': 'Max Hirschhorn', 'email': 'max.hirschhorn@mongodb.com', 'username': 'visemet'}

Message: SERVER-56418 Avoid error in donor if temp collection already renamed.
Branch: master
https://github.com/mongodb/mongo/commit/bdc6725265d3fdcaf5984ced835cb53c3b3946f8

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