[SERVER-78659] The secondary thread of the Balancer should join its TaskExecutor when leaving to correctly clean its state on step down Created: 04/Jul/23  Updated: 29/Oct/23  Resolved: 07/Jul/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0-rc0, 7.0.0-rc7, 6.0.9

Type: Bug Priority: Major - P3
Reporter: Paolo Polato Assignee: Paolo Polato
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Problem/Incident
is caused by SERVER-77868 Balancer secondary thread should rese... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.0, v6.0
Sprint: Sharding EMEA 2023-07-10
Participants:
Linked BF Score: 145

 Description   

The secondary thread of the balancer makes use of a ScopedTaskExecutor to asynchronously dispatch remote commands and process their outcome.
When such threads exits, it should make sure that there are no remaining commands/outcomes to be processed by joining such executor to ensure that its internal state remains consistent throughout multiple "step down + step up cycles"



 Comments   
Comment by Githook User [ 07/Jul/23 ]

Author:

{'name': 'Paolo Polato', 'email': 'paolo.polato@mongodb.com', 'username': 'ppolato'}

Message: SERVER-78659 Join the TaskExecutor while leaving the Balancer secondary thread

(cherry picked from commit bc599781ba3b1069ef132c79acca937d7642ee83)
Branch: v6.0
https://github.com/mongodb/mongo/commit/0a69c88b11c5bcf906afe0d0f2dc18b00554d5ff

Comment by Githook User [ 07/Jul/23 ]

Author:

{'name': 'Paolo Polato', 'email': 'paolo.polato@mongodb.com', 'username': 'ppolato'}

Message: SERVER-78659 Join the TaskExecutor while leaving the Balancer secondary thread

(cherry picked from commit bc599781ba3b1069ef132c79acca937d7642ee83)
Branch: v7.0
https://github.com/mongodb/mongo/commit/0da55a602287fdac7c000705656092e52228cd12

Comment by Githook User [ 06/Jul/23 ]

Author:

{'name': 'Paolo Polato', 'email': 'paolo.polato@mongodb.com', 'username': 'ppolato'}

Message: SERVER-78659 Join the TaskExecutor while leaving the Balancer secondary thread
Branch: master
https://github.com/mongodb/mongo/commit/bc599781ba3b1069ef132c79acca937d7642ee83

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