repl_writer_thread_count_param.js should use assert.soon() when grepping logs

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor - P4
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Replication
    • Fully Compatible
    • Repl 2025-12-22, Repl 2026-01-05, Repl 2026-01-19
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      repl_writer_thread_count_param.js sometimes fail because of an assert when grepping logs for a certain message, see BF-40992.

      Assert failure is here: https://github.com/10gen/mongo/blob/40c8f7d482e0d2b63fedcfaaaf4858958604f4f7/jstests/noPassthrough/replication/repl_writer_thread_count_param.js#L356

      We expect the thread pool to spawn new threads when increasing the replWriterMinThreadCount param, but from the log, the new threads are spawned right after the assert fails (see logs). My guess is that sometimes the logs get written to the file/output a bit slower than usual, resulting in the assert being executed before the logs get actually written.

      The solution is to use assert.soon() so as to give time for the logs to be flushed.

            Assignee:
            Pierre Turin
            Reporter:
            Pierre Turin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: