[SERVER-33243] Improve logging when a node changes its sync source Created: 09/Feb/18  Updated: 29/Oct/23  Resolved: 13/Jul/18

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 3.6.7, 4.0.2, 4.1.1

Type: Bug Priority: Major - P3
Reporter: Siyuan Zhou Assignee: Siyuan Zhou
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.0, v3.6
Sprint: Repl 2018-07-02, Repl 2018-07-16, Repl 2018-07-30
Participants:
Linked BF Score: 0

 Description   

We need better logging whenever a node changes the sync source. That includes the time and the reason, no matter whether it's setting or clearing the sync source.



 Comments   
Comment by Githook User [ 13/Aug/18 ]

Author:

{'username': 'visualzhou', 'email': 'siyuan.zhou@mongodb.com', 'name': 'Siyuan Zhou'}

Message: SERVER-33243 Improve logging when a node changes its sync source

(cherry picked from commit 97f15caddf7835ef5ed252257903edc52dae9aaf)
Branch: v3.6
https://github.com/mongodb/mongo/commit/15d2af439e6426c7232a75403739250b1537c54a

Comment by Githook User [ 13/Aug/18 ]

Author:

{'name': 'Siyuan Zhou', 'email': 'siyuan.zhou@mongodb.com', 'username': 'visualzhou'}

Message: SERVER-33243 Improve logging when a node changes its sync source

(cherry picked from commit 97f15caddf7835ef5ed252257903edc52dae9aaf)
Branch: v4.0
https://github.com/mongodb/mongo/commit/d55d86fd403caa4b7edcd38ea14cb1aaf40e2119

Comment by Githook User [ 13/Jul/18 ]

Author:

{'username': 'visualzhou', 'name': 'Siyuan Zhou', 'email': 'siyuan.zhou@mongodb.com'}

Message: SERVER-33243 Improve logging when a node changes its sync source
Branch: master
https://github.com/mongodb/mongo/commit/97f15caddf7835ef5ed252257903edc52dae9aaf

Comment by Siyuan Zhou [ 09/Feb/18 ]

For example, bgsync::clearSyncTarget() can be called without any log messages. Another subtle issue is the logged sync source might be different from the actual one used by fetcher if the sync source gets cleared in the between, which is very confusing. So auditing all writes of _syncSourceHost is needed to make sure the log messages are sufficient and consistent.

Comment by Spencer Brody (Inactive) [ 09/Feb/18 ]

So, we attempted this already in SERVER-26528. What was missing from that work? Is there a reason we couldn't include the information you'd like?

siyuan.zhou judah.schvimer

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