Fix non-deterministic test validate_db_metadata_command.js

XMLWordPrintableJSON

    • Query Execution
    • Fully Compatible
    • ALL
    • QE 2026-02-16
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      BF-41406 revealed an issue in the test jstests/core/administrative/validate_db_metadata_command.js.

      The test sometimes fails non-deterministically for this command.
      The tests expects the validateDBMetadata command to fail because validation should report an error about a text index, which is unsupported with stable API version 1.

      The test sometimes passes and sometimes doesn't, and it seems to depend on the speed of index creation in a sharded cluster. It looks like the text index creation command that is executed here can still operate when the validate command is started. If this is the case, the validate command may not see the text index (yet) and may not fail as expected, which makes the test fail.

      The non-deterministic test should be fixed to take this timing issue into account,

            Assignee:
            Jan Steemann
            Reporter:
            Jan Steemann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: