[SERVER-79908] Cause of initial sync should be logged by default Created: 10/Aug/23 Updated: 29/Oct/23 Resolved: 18/Sep/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.2.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Matt Kneiser | Assignee: | Xuerui Fa |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Replication
|
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Repl 2023-08-21, Repl 2023-09-04, Repl 2023-09-18, Repl 2023-10-02 |
| Participants: |
| Description |
|
From my investigation in HELP-47199, I observed that the server logs the decision to initial sync or not, but not why. A user needs to enable debug-level replication logs to get a hint at one of the two reasons. It should be straightforward to include more useful info by default. Since this behavior is triggered once on boot, it shouldn't meaningfully add bloat to overall server logging and can help diagnose initial sync issues quicker. The simplest solution is to add logging of lastOpTime and isInitialSyncFlagSet to the "Initial sync required" log line. There might be some other diagnostics in this general area that would be helpful too. |
| Comments |
| Comment by Githook User [ 18/Sep/23 ] |
|
Author: {'name': 'XueruiFa', 'email': 'xuerui.fa@mongodb.com', 'username': 'XueruiFa'}Message: |