[SERVER-62521] Distributed locks might not be released on definite error when using a DDL coordinator Created: 11/Jan/22  Updated: 29/Oct/23  Resolved: 08/Mar/22

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 6.0.0-rc0, 5.0.7, 5.3.0-rc3, 5.2.2

Type: Bug Priority: Major - P3
Reporter: Marcos José Grillo Ramirez Assignee: Marcos José Grillo Ramirez
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Problem/Incident
is caused by SERVER-55150 Add whitelist of errors that will not... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.3, v5.2, v5.0
Sprint: Sharding EMEA 2022-02-07, Sharding EMEA 2022-02-21, Sharding EMEA 2022-03-07, Sharding EMEA 2022-03-21
Participants:

 Description   

There are some implementations of the DDL coordinator (like movePrimary) that are designed to not always make forward progress on retriable errors. Such classes set the _completeOnError flag which will prevent retrying the operation if a retriable error is found.

The purpose of this task, is to ensure that if a retriable error occurs (such as a stepdown in the config server) in a DDLCoordinator implementation that has the _completeOnError flag set to true, the distributed locks are released. The following scenario is an example:

  • A movePrimary command starts
  • There is a stepdown on the config server when committing

This will leave the primary node of the primary shard with the distributed lock for the database acquired. This would only affect operations that try to grab the database distributed lock on the config server after the scenario has happened.



 Comments   
Comment by Githook User [ 08/Mar/22 ]

Author:

{'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: SERVER-62521 Ensure distributed locks are being released even if a remote stepdown error occurs

(cherry picked from commit c9a74181ade07e824a0b6bec6913d27c56e8bf21)
Branch: v5.2
https://github.com/mongodb/mongo/commit/f7dfccadbb6f19018765b96ca746dcdeb74cf1ec

Comment by Githook User [ 08/Mar/22 ]

Author:

{'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: SERVER-62521 Ensure distributed locks are being released even if a remote stepdown error occurs

(cherry picked from commit c9a74181ade07e824a0b6bec6913d27c56e8bf21)
Branch: v5.0
https://github.com/mongodb/mongo/commit/95e40bc43e1492fb329ae9b845314ccf24dcee18

Comment by Githook User [ 08/Mar/22 ]

Author:

{'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: SERVER-62521 Ensure distributed locks are being released even if a remote stepdown error occurs

(cherry picked from commit c9a74181ade07e824a0b6bec6913d27c56e8bf21)
Branch: v5.3
https://github.com/mongodb/mongo/commit/ebb15b33a2524d5999de8b71f252ee34714fbc46

Comment by Githook User [ 03/Mar/22 ]

Author:

{'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: SERVER-62521 Ensure distributed locks are being released even if a remote stepdown error occurs
Branch: master
https://github.com/mongodb/mongo/commit/c9a74181ade07e824a0b6bec6913d27c56e8bf21

Comment by Githook User [ 02/Mar/22 ]

Author:

{'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: Revert "SERVER-62521 Ensure distributed locks are being released even if a remote stepdown error occurs"

This reverts commit 97d77fc98b26331b280966bbc9b3787dc26e64cb.
Branch: v5.3
https://github.com/mongodb/mongo/commit/9fb59e90fdb97de986174f745bd76747ece5bc40

Comment by Githook User [ 02/Mar/22 ]

Author:

{'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: Revert "SERVER-62521 Ensure distributed locks are being released even if a remote stepdown error occurs"

This reverts commit 88792c58a2f26249ecbe2474ba9960f59020bf3a.
Branch: v5.0
https://github.com/mongodb/mongo/commit/99cbec2341c967585770c94b3004460702ba02c8

Comment by Githook User [ 02/Mar/22 ]

Author:

{'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: Revert "SERVER-62521 Ensure distributed locks are being released even if a remote stepdown error occurs"

This reverts commit 42c5d825b962b3190b8c8a639d022f6660eaeee0.
Branch: master
https://github.com/mongodb/mongo/commit/ebd873f520e214c61df66f1ce291d1af72671d6c

Comment by Githook User [ 02/Mar/22 ]

Author:

{'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: Revert "SERVER-62521 Ensure distributed locks are being released even if a remote stepdown error occurs"

This reverts commit 2551b634920f2fec7e8d780e7ea99d078b3af3bd.
Branch: v5.2
https://github.com/mongodb/mongo/commit/cee57ffcdbf134093e465cb36f50941de25f6330

Comment by Githook User [ 01/Mar/22 ]

Author:

{'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: SERVER-62521 Ensure distributed locks are being released even if a remote stepdown error occurs

(cherry picked from commit 42c5d825b962b3190b8c8a639d022f6660eaeee0)
Branch: v5.2
https://github.com/mongodb/mongo/commit/2551b634920f2fec7e8d780e7ea99d078b3af3bd

Comment by Githook User [ 01/Mar/22 ]

Author:

{'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: SERVER-62521 Ensure distributed locks are being released even if a remote stepdown error occurs

(cherry picked from commit 42c5d825b962b3190b8c8a639d022f6660eaeee0)
Branch: v5.3
https://github.com/mongodb/mongo/commit/97d77fc98b26331b280966bbc9b3787dc26e64cb

Comment by Githook User [ 01/Mar/22 ]

Author:

{'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: SERVER-62521 Ensure distributed locks are being released even if a remote stepdown error occurs

(cherry picked from commit 42c5d825b962b3190b8c8a639d022f6660eaeee0)
Branch: v5.0
https://github.com/mongodb/mongo/commit/88792c58a2f26249ecbe2474ba9960f59020bf3a

Comment by Githook User [ 01/Mar/22 ]

Author:

{'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: SERVER-62521 Ensure distributed locks are being released even if a remote stepdown error occurs
Branch: master
https://github.com/mongodb/mongo/commit/42c5d825b962b3190b8c8a639d022f6660eaeee0

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