-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Replication
-
Fully Compatible
-
Repl 2023-08-21, Repl 2023-09-04, Repl 2023-09-18, Repl 2023-10-02
-
None
-
None
-
None
-
None
-
None
-
None
-
None
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.