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

Log all failed commands in test execution

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • CAR Team 2024-06-24

      To ease the debugging process, we would like all the failed command execution to be logged during test execution. In particular, when a command execution completes, if the response contains ok: 0 we should emit a log.

      Existing mechanisms

      Slow query logging

      Currently, when a command completes its execution on a node we call  CurOp::completeAndLogOperation. This function will emit a slow query log if the command took more than the configured threshold.

      This is not sufficient because if a command failed, but it took less than the configured threshold, it won't be logged.

      Uassert logging

      We could force the logging of all uasserts by enabling debug level 1 for kAssert log component in our tests.

      This will probably log too much, in fact we often trigger uassert even for successful command execution.

      Moreover, this log message is not easy to associated to the command in which the uassert happened, since the log message does not contain command information.

      Failed command debug logging

      We could force the logging of all failed command by enabling debug level 1 for kCommand log component in our tests.

      This will probably pollute the logs too much because the kCommand log component is used in many files (194 at the moment)

            Assignee:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Reporter:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: