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

Don't use retryable writes in upsert_sharded.js

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.3.1
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Fully Compatible
    • ALL
    • Sharding 2019-11-18
    • 50

      As of SERVER-44382, jstests/sharding/upsert_sharded.js asserts documents can be upserted without shard key fields. The query of an upsert is required to target a single shard, and if the shard that's targeted is not the shard that would own the upserted document, a transaction will be used internally to atomically insert the document onto the correct shard. Currently the test's queries for its upserts of documents missing the shard key target a different shard than the one that owns missing shard key fields, so the test can only run when txnNumbers are allowed.

      The test isn't meant to test this internal transaction, just that upserted documents don't need all shard key fields, so the test can be allowed without txnNumber support by ensuring every upsert that currently leads to a transaction uses a query that targets the same shard that would own the upserted document.

            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: