[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: |
|
||||||||
| 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: (cherry picked from commit 97f15caddf7835ef5ed252257903edc52dae9aaf) |
| Comment by Githook User [ 13/Aug/18 ] |
|
Author: {'name': 'Siyuan Zhou', 'email': 'siyuan.zhou@mongodb.com', 'username': 'visualzhou'}Message: (cherry picked from commit 97f15caddf7835ef5ed252257903edc52dae9aaf) |
| Comment by Githook User [ 13/Jul/18 ] |
|
Author: {'username': 'visualzhou', 'name': 'Siyuan Zhou', 'email': 'siyuan.zhou@mongodb.com'}Message: |
| 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 |