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

Robustify tests that check for messages in the mongod log

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • 0

      A number of tests use the getLog command to check whether the mongod log contains a certain message. This command returns the last N entries in the log that are kept in memory.

      As shown by BF-33156 this can result in unstable tests if the log gets full of other messages for some reason. In such cases these unexpected messages may push out of the log the message that is being tested for.

      A few solutions are possible:

      • Implement a new command "findInLog" that accepts a regex, and directly searches in the complete log file. This is currently the preferred solution.
      • Add a failpoint which when activated prevents the in-memory log buffer from being truncated. This may have the undesired effect that the log takes too much memory, and both slows down tests, as well as results in OOMs.
      • An alternative is to extend the size of the in-memory to be sufficiently large but not infinite. Then it is not clear how large should it be for each test.

            Assignee:
            timour.katchaounov@mongodb.com Timour Katchaounov
            Reporter:
            timour.katchaounov@mongodb.com Timour Katchaounov
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: