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

jstests/sharding/txn_read_only_transactions.js should look for logged lines in a loop

    • Fully Compatible
    • ALL
    • Sharding 2019-04-08
    • 32

      jstests/sharding/txn_read_only_transactions.js tests read only transactions by running commitTransaction commands and asserting certain lines are logged by mongos to determine the correct version of commit was used, i.e. a read-only commit vs. a two-phase commit. It does so by searching for the expected log in the shell's rawMongoProgramOutput after running the commits.

      Although the commits must have finished by this point, it is not guaranteed the lines logged by mongos during commit have reached the shell's rawMongoProgramOutput, in which case the test fails (verified by adding sleeps in ProgramOutputMultiplexer::appendLine when the line to add is one of those the test is looking for).

      The simplest fix for this is to perform the search for logs in a loop, since in normal operation the lines should reach rawMongoProgramOutput eventually.

            Assignee:
            jack.mulrow@mongodb.com Jack Mulrow
            Reporter:
            jack.mulrow@mongodb.com Jack Mulrow
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: