[SERVER-6968] Log a message in the mongos when the balancer state is changed Created: 07/Sep/12  Updated: 10/Dec/14  Resolved: 26/Apr/13

Status: Closed
Project: Core Server
Component/s: Diagnostics, Logging, Sharding
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: Unassigned
Resolution: Won't Fix Votes: 1
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-6967 Add entry to the changelog when the b... Closed
Participants:

 Comments   
Comment by Eliot Horowitz (Inactive) [ 26/Apr/13 ]

I don't think the mongos logs are a good place for this.
There could be hundreds of them.

We are now (2.4) keeping an oplog on the config servers.
So would be easy to see when it was changed there.

Could even add a helper function I guess.

Comment by Gianfranco Palumbo [ 25/Apr/13 ]

i'm guessing, since this is simple update operation, maybe this needs to be changed to a adminCommand or something like that first

https://github.com/mongodb/mongo/blob/master/src/mongo/shell/utils_sh.js#L95

sh.setBalancerState = function( onOrNot ) { 
    db.getSisterDB( "config" ).settings.update({ _id: "balancer" }, { $set : { stopped: onOrNot ? false : true } }, true );
}

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