[SERVER-44512] Don't use retryable writes in upsert_sharded.js Created: 08/Nov/19  Updated: 29/Oct/23  Resolved: 11/Nov/19

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.3.1

Type: Bug Priority: Major - P3
Reporter: Jack Mulrow Assignee: Jack Mulrow
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2019-11-18
Participants:
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.



 Comments   
Comment by Githook User [ 11/Nov/19 ]

Author:

{'name': 'Jack Mulrow', 'username': 'jsmulrow', 'email': 'jack.mulrow@mongodb.com'}

Message: SERVER-44512 Don't use retryable writes in upsert_sharded.js
Branch: master
https://github.com/mongodb/mongo/commit/c0af98b8eb800e30333d096965f916214e66db09

Generated at Thu Feb 08 05:06:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.