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

Use consistent tags for continuous stepdown thread logs

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Replication
    • Fully Compatible
    • ALL
    • Repl 2023-10-30, Repl 2023-11-13, Repl 2023-11-27
    • None
    • 0
    • None
    • None
    • None
    • None
    • None
    • None

      The ContinuousStepdown thread which runs in resmoke calls a replicaset.ReplicaSetFixture.stepup_node() method which uses the fixture's logger

      The result is that the log emitted in this function are tagged with the replicaset tag (e.g. [j0:s0] )

      This is very confusing for two main reasons:

      • The log is emitted by the stepdown thread and not from the replicaset itself. This makes very complicated to grep for all the logs line emitted by the stepdown thread.
      • The tag should belong to a shard but it doesn't contain the replicaset node number (e.g. [j0:s0:n1] ), thus it is exactly the same tag as the first mongos.

      One way to solve this could be to have these methods accept a logging.Logger and having the ContinuousStepdown thread pass in its logger would be one way to associate the work being done on behalf of the ContinuousStepdown thread.

            Assignee:
            vishnu.kaushik@mongodb.com Vishnu Kaushik
            Reporter:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: