Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-79908

Cause of initial sync should be logged by default

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.2.0-rc0
    • None
    • None
    • None
    • Replication
    • Fully Compatible
    • Repl 2023-08-21, Repl 2023-09-04, Repl 2023-09-18, Repl 2023-10-02

    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.

      Attachments

        Activity

          People

            xuerui.fa@mongodb.com Xuerui Fa
            matt.kneiser@mongodb.com Matt Kneiser
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: