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

Don't use retryable writes in upsert_sharded.js

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.3.1
    • Component/s: Sharding
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Sharding 2019-11-18
    • Linked BF Score:
      50

      Description

      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.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: