[SERVER-2629] Stopping balancer doesn't work Created: 26/Feb/11  Updated: 16/Nov/21  Resolved: 26/Feb/11

Status: Closed
Project: Core Server
Component/s: Admin
Affects Version/s: 1.6.5
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Sergei Tulentsev Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

Balancer acquires lock after it was stopped. See command log.

> new Date()
"Sat Feb 26 2011 03:52:17 GMT+0300 (MSK)"
> db.settings.update(

{ _id: "balancer" }

, { $set : { stopped: true}}, true)

... some time later ...

> db.locks.find()

{ "_id" : "balancer", "process" : "cs395:1298591070:1804289383", "state" : 1, "ts" : ObjectId("4d684f203edb47525bb2e83c"), "when" : "Sat Feb 26 2011 03:53:52 GMT+0300 (MSK)", "who" : "cs395:1298591070:1804289383:Balancer:846930886", "why" : "doing balance round" }

{ "_id" : "pravdorub_production.answers", "process" : "cs2592:1295720613:2071809637", "state" : 0, "ts" : ObjectId("4d587643a02cc5c2bbd7744b"), "when" : "Mon Feb 14 2011 03:24:35 GMT+0300 (MSK)", "who" : "cs2592:1295720613:2071809637:conn470:1907961462", "why" : "migrate-

{ uiq: 16559695 }

" }
{ "_id" : "pravdorub_production.vk_users", "process" : "cs3703:1298564181:1400280430", "state" : 0, "ts" : ObjectId("4d669b686fa526066376363c"), "when" : "Thu Feb 24 2011 20:54:48 GMT+0300 (MSK)", "who" : "cs3703:1298564181:1400280430:conn213:291587465", "why" : "migrate-

{ _id: MinKey }

" }
{ "_id" : "pravdorub_production.answer2s", "process" : "cs2607:1295150945:1579473330", "state" : 0, "ts" : ObjectId("4d57b0595c7c16c70bc08f26"), "when" : "Sun Feb 13 2011 13:20:09 GMT+0300 (MSK)", "who" : "cs2607:1295150945:1579473330:conn892:298881702", "why" : "migrate-

{ sdate: \"201012\", uiq: \"62446863\" }

" }



 Comments   
Comment by Eliot Horowitz (Inactive) [ 26/Feb/11 ]

It gets the lock before checking.
The logs will tell you if its doing anything.
Using the locks is not a good way to do it.

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