-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 3.4.10, 3.5.9
-
Component/s: Sharding
-
Fully Compatible
-
ALL
-
Sharding 2017-07-10, Sharding 2017-07-31, Sharding 2017-10-23, Sharding 2017-11-13, Sharding 2019-12-16, Sharding 2019-12-30, Sharding 2020-01-13
-
0
The sharding balancer shutdown process eventually calls Balancer::waitForBalancerToStop in order to wait for the balancer thread to terminate. This method is called both by replication promotion to primary and by the shutdown sequence.
If a node being promoted to primary is shutdown at the same time, it is possible that two calls enter Balancer::waitForBalancerToStop concurrently which will both call std::thread::join, which is not allowed.