v8.2: Robustify geo_s2stale_polygon_parse.js

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.2.13
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Integration
    • Fully Compatible
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The 'magic_restore' passthrough suites get confused by this kind of loop:

              it(`does not crash with 2dsphere index version ${version}`, function() {
                   const coll = db[jsTestName() + "_v_" + version];
                   coll.drop();
                   // insert a new document with _id: 1. 
      

      The suite loads jstests/libs/override_methods/noop_drop.js, which no-ops coll.drop(). Combined with mochalite's deferred execution model, each it block's drop() becomes a no-op, so the second iteration's insert(
      {_id: 1, ...})
      collides with the doc from the first iteration.

        There is some precedence for this kind of issue:
        - SERVER-108224 (fixed Aug 2025) — "Mochalite tests bypass test runners defined by passthrough suites." Custom runners like magic_restore_passthrough_runner.js wrap the file's import, but mochalite runs via the shell-invoked __mochalite_closer after import, so overrides applied by the runner don't cover the it bodies the same way.
        - BF-38850 — closed with a revert; same E11000 dup-key shape on _id: 0 through mochalite.js frames.
        - The sharding variant's yaml already excludes upsert_fields.js with the comment "Fails upsert operations with duplicate key errors due to drops being no-oped."

      A second issue discovered with some timeouts related to this test:

      A transaction passthrough wraps each iteration's insert+find in a transaction; it relies on the next iteration drop to commit. The last iteration (v3) is left open, because there is no operation after it. SERVER-131815 describes the full issue. We propose a workaround for this test on the v8.2 branch.

            Assignee:
            Charlie Swanson
            Reporter:
            Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: