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

Consider ignoring exceptions rethrown from future_impl.h from stacktrace-gathering induced by traceException server parameter

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Service Arch

    Description

      The server offers a traceExceptions server parameter (see https://www.mongodb.com/docs/manual/reference/parameters/#mongodb-parameter-param.traceExceptions) that configures the server to log full stack-traces for every DBException thrown. Server engineers use this feature to debug jstests, and some jstests temporarily configure the parameter to be set to add diagnostic information for difficult BFs.

      However, in async code, because the same exception is often caught and re-thrown by the future library multiple times as it propogates down a continuation chain, this can lead to the same exception being logged with a complete stack trace many times. This clutters the log and can make it more difficult to understand the control flow induced by the exception.

      We should consider omitting these re-throws from the stacktrace-logging requirement when traceExceptions is enabled. We could also consider a more general solution to try and only show the intial stack trace of an exception that may be caught and re-thrown with additional context multiple times.    

      Attachments

        Activity

          People

            backlog-server-servicearch Backlog - Service Architecture
            george.wangensteen@mongodb.com George Wangensteen
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: