[SERVER-37422] Log balancer start and stop events in the actionlog Created: 02/Oct/18  Updated: 29/Oct/23  Resolved: 08/Jul/19

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

Type: Improvement Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: Janna Golden
Resolution: Fixed Votes: 4
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Duplicate
is duplicated by SERVER-6967 Add entry to the changelog when the b... Closed
Related
related to SERVER-50543 Log the application client starting o... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.2, v4.0, v3.6
Sprint: Sharding 2019-07-15
Participants:
Case:

 Description   

Currently the balancer start and stop commands are not logged anywhere and because of this it is difficult to pinpoint the timings and the callers which changed the balancer state. It would be very useful if we logged balancer start and stop in the actionlog along with some additional information about the caller which did that.



 Comments   
Comment by Githook User [ 22/Aug/20 ]

Author:

{'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}

Message: SERVER-37422 Log balancer start and stop events in action log

(cherry picked from commit af041ce1457ddf7c9bf29a07bc1e995e4c47495f)
Branch: v4.2
https://github.com/mongodb/mongo/commit/6b008956cc2ed0ce4fcc5679eedca7d1101bc26f

Comment by Kaloian Manassiev [ 15/Jun/20 ]

Confirming that this logs both in config.actionlog and in the log file with this message.

Comment by Nic Cottrell [ 14/Jun/20 ]

I see in the source code that this fix includes:

        ShardingLogging::get(opCtx)->logAction(opCtx, "balancer.stop", "", BSONObj()).ignore();

Does this log in both the actionlog and the log file for the config server? If not, is there a reason why not and can it be added?

Comment by Githook User [ 08/Jul/19 ]

Author:

{'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}

Message: SERVER-37422 Log balancer start and stop events in action log
Branch: master
https://github.com/mongodb/mongo/commit/af041ce1457ddf7c9bf29a07bc1e995e4c47495f

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