[SERVER-22463] sh.startBalancer should be smarter about balancing windows Created: 04/Feb/16  Updated: 06/Dec/22  Resolved: 02/Dec/16

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: None
Fix Version/s: 3.4.0

Type: Improvement Priority: Major - P3
Reporter: Kevin Pulo Assignee: [DO NOT USE] Backlog - Sharding Team
Resolution: Done Votes: 0
Labels: PM229
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to DOCS-6721 Recommend sh.startBalancer() over sh.... Closed
related to SERVER-21766 Remove waiting for balancer lock beha... Closed
Assigned Teams:
Sharding
Participants:

 Description   

If a balancer window is defined, and sh.startBalancer is run outside the window, then it will timeout after 30s (by default) with a cryptic error message. Better would be if sh.startBalancer noticed that a window is defined, and if the most recent entry in config.mongos indicates that the mongoses are outside the window, then it doesn't wait for the balancer distlock and instead prints a message. See also DOCS-6721.



 Comments   
Comment by Kaloian Manassiev [ 02/Dec/16 ]

With the move of the sharding balancer to the config server, this should no longer be an issue because now sh.startBalancer is just an invocation of a command to enable the balancer and does not block on anything.

Comment by Kaloian Manassiev [ 08/Feb/16 ]

Acknowledged. I will add updating sh.startBalancer to the list of tasks for CSRS balancing.

Comment by Spencer Brody (Inactive) [ 04/Feb/16 ]

With the current plan for moving the balancer to the config servers, sh.start/stopBalancer will need to be updated anyway as the balancer distlock won't be locked/unlocked on each round, so I suspect this can be trivially fixed at the same time as that work.

CC kaloian.manassiev

Generated at Thu Feb 08 04:00:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.