[SERVER-60220] ReshardingCoordinator::installCoordinatorDoc should update in memory state before calling logChange Created: 24/Sep/21  Updated: 29/Oct/23  Resolved: 08/Oct/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 5.2.0, 5.0.4, 5.1.0-rc1

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: Luis Osta (Inactive)
Resolution: Fixed Votes: 0
Labels: PM-234-M3, PM-234-T-lifecycle, sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.1, v5.0
Sprint: Sharding 2021-10-18
Participants:
Linked BF Score: 21
Story Points: 1

 Description   

logChange will eventually call shard::runCommand, which has checks if operation context was interrupted. This is problematic because installCoordinatorDoc is usually used in conjunction with a corresponding write to update coordinate state. And if it gets interrupted while calling logChange, the in-memory state will remain in the pre-update state and will incorrectly retry ops if inside a WithAutomaticRetry.



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

Author:

{'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}

Message: SERVER-60220 Swap order of logChange and in-memory state update
Branch: v5.0
https://github.com/mongodb/mongo/commit/829c80b8eceaa8d212a406516b7f80fb3d94c330

Comment by Githook User [ 11/Oct/21 ]

Author:

{'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}

Message: SERVER-60220 Swap order of logChange and in-memory state update
Branch: v5.1
https://github.com/mongodb/mongo/commit/4fac54b820a9b461f7e0b4731dac8f9683f6a761

Comment by Githook User [ 07/Oct/21 ]

Author:

{'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}

Message: SERVER-60220 Swap order of logChange and in-memory state update
Branch: master
https://github.com/mongodb/mongo/commit/a8c4b5bbf7b838a639b7133cfcad5a92a65041cc

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