ExportXMLWordPrintableJSON

    • Needed

      Summary

      The database-level aggregate tests in crud/tests/unified/db-aggregate-write-readPreference write their $out and $merge output to coll0, a collection that many other tests drop and recreate. On MongoDB 8.0+ a write concern only guarantees the write is durable on a majority, not yet applied on the secondary, so a secondary can still be applying the recreate of coll0 when the aggregate arrives. The aggregate then fails with "indexes of target collection db0.coll0 changed during processing". Change these tests to write to a dedicated output collection that no other test creates, drops or seeds.

      Motivation

      Who is the affected end user?

      No end users. This affects driver CI only.

      How does this affect the end user?

      Not applicable.

      How likely is it that this problem or use case will occur?

      Intermittent, on replica set variants running server 8.0+. It needs the aggregate to run on a secondary shortly after another test recreates coll0.

      If the problem does occur, what are the consequences and how severe are they?

      A spurious test failure in CI. It is the same error as DRIVERS-2914, but caused by other tests recreating the shared collection rather than by this test's own setup.

      Is this issue urgent?

      No.

      Is this ticket required by a downstream team?

      No.

      Is this ticket only for tests?

      Yes.

      Acceptance Criteria

      The $out and $merge tests in db-aggregate-write-readPreference no longer use coll0 as their output collection, and the generated JSON is regenerated from the YAML. The tests continue to pass on replica sets for all supported server versions.

            Assignee:
            Unassigned
            Reporter:
            Adelin Mbida Owona
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: