[SERVER-56026] state key on config.locks Created: 12/Apr/21 Updated: 06/Dec/22 Resolved: 12/Apr/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 3.2.21 |
| Fix Version/s: | None |
| Type: | Question | Priority: | Major - P3 |
| Reporter: | Javier Bassi | Assignee: | Backlog - Triage Team |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Server Triage
|
| Participants: |
| Description |
|
Context: I'm on the process of upgrading a sharded cluster from 3.2 to 3.4. Before that I need to convert the config servers from SCCC to a replica set (CSRS).[1] In order to do that I need first to stop de balancer.[2]
We I try to stop de balancer I get this:
After that I checked the changelog and actually the balancer stopped. I even waited a few days. Right now changelog is only increasing with multi-split but the last moveChunk.to has a few days.
I need to let mongo know that the balancer is stopped so that the command isBalancerRunning returns false and I can move on. I think I need to edit the 'state' key on 'balancer' document on 'locks' collection on config database. (But I'm not really sure). Right now has value 2. (which is the only value documented on the documentation [3])
This is what locks look like:
I know that on normal operation I'm not supposed to edit the config db. I have a backup just in case. I can temporarily stop the shards if necessary. [1] https://docs.mongodb.com/manual/release-notes/3.4-upgrade-sharded-cluster/ [2] https://docs.mongodb.com/v3.4/tutorial/upgrade-config-servers-to-replica-set/ [3] https://docs.mongodb.com/v3.2/reference/config-database/ |
| Comments |
| Comment by Javier Bassi [ 12/Apr/21 ] | ||||
|
Thanks for the fast reply. balancerStatus was introduced on 3.4 I think. I'm trying to get there.
| ||||
| Comment by Dmitry Agranat [ 12/Apr/21 ] | ||||
|
As MongoDB 3.2 has reached EOL in December 2015 and MongoDB 3.4 in November 2016, we'd like to encourage you to start by asking our community for help by posting on the MongoDB Developer Community Forums. A short note about your issue. It looks like the output you have posted was from the sh.isBalancerRunning() command. The isBalancerRunning function is defined by the mongo shell, *not *the mongoS router. To verify the shell is reading the correct information, you can run:
Dima |