[SERVER-54896] Setting getLastErrorDefaults breaks multi-document transactions Created: 02/Mar/21  Updated: 29/Oct/23  Resolved: 08/Jun/21

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

Type: Bug Priority: Major - P3
Reporter: Shane Harvey Assignee: Huayu Ouyang
Resolution: Fixed Votes: 0
Labels: pm-2130-post-rc0, post-rc0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
is related to SERVER-55701 Ignore replica set config's getLastEr... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4
Sprint: Repl 2021-06-14
Participants:
Case:

 Description   

Reported here: https://developer.mongodb.com/community/forums/t/writeconcern-is-not-allowed-within-a-multi-statement-transaction/16838/2

Setting getLastErrorDefaults in the replica set config will break write operations in multi-document transactions. Each transactional write will fail with:

{'ok': 0.0, 'errmsg': 'writeConcern is not allowed within a multi-statement transaction', 'code': 72, 'codeName': 'InvalidOptions'}

The setDefaultRWConcern command does not have this problem.



 Comments   
Comment by Githook User [ 08/Jun/21 ]

Author:

{'name': 'Huayu Ouyang', 'email': 'huayu.ouyang@mongodb.com', 'username': 'huayu-ouyang'}

Message: SERVER-54896 Setting getLastErrorDefaults breaks multi-document transactions
Branch: v4.4
https://github.com/mongodb/mongo/commit/70c8764a68d6abec112d77607c0c185a37de6270

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