[SERVER-62921] Improve sync source selection logging Created: 24/Jan/22  Updated: 29/Oct/23  Resolved: 07/Sep/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.2.0-rc0, 7.0.3

Type: Improvement Priority: Major - P3
Reporter: Lingzhi Deng Assignee: Evelyn Wu
Resolution: Fixed Votes: 0
Labels: former-quick-wins
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
Assigned Teams:
Replication
Backwards Compatibility: Fully Compatible
Backport Requested:
v7.0, v6.0, v5.0, v4.4
Sprint: Repl 2023-09-04, Repl 2023-09-18
Participants:

 Description   

Improve log verbosity around sync source selection to include reasons why a certain node is/isn't chosen as a sync source. For example, customers want to know why the "nearest" node isn't chosen (e.g. not being a voter) when initialSyncSourceReadPreference is "nearest".

FWIW, currently in the function _isEligibleSyncSource, we have some debug log messages (e.g. "Cannot select sync source because we are a voter and it is not"). I wonder if it would be good enough to make those info level logs.



 Comments   
Comment by Githook User [ 27/Sep/23 ]

Author:

{'name': 'Evelyn Wu', 'email': 'evelyn.wu@mongodb.com', 'username': 'evelynwumongo'}

Message: SERVER-62921 Improve sync source selection logging

(cherry picked from commit 230199620ae21589a942280f09940d7157773de9)
Branch: v7.0
https://github.com/mongodb/mongo/commit/6e9fca710cb41321a40b53afd8c31ad07d360c70

Comment by Githook User [ 07/Sep/23 ]

Author:

{'name': 'Evelyn Wu', 'email': 'evelyn.wu@mongodb.com', 'username': 'evelynwumongo'}

Message: SERVER-62921 Improve sync source selection logging
Branch: master
https://github.com/mongodb/mongo/commit/230199620ae21589a942280f09940d7157773de9

Generated at Thu Feb 08 05:56:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.