[SERVER-34679] Write concern errors are lost when commands fail by throwing an exception Created: 25/Apr/18  Updated: 29/Oct/23  Resolved: 03/May/18

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 4.0.0-rc0

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

Issue Links:
Related
related to SERVER-25765 Commands should wait for write concer... Closed
related to SERVER-34628 Remove appendCommandStatus() in favor... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Platforms 2018-05-07
Participants:

 Description   

In SERVER-25765 we changed mongod to wait for write concern even if the command failed by throwing an exception. If that times out or otherwise fails it adds a "writeConcernError" field to the reply. Unfortunately, the exception handler then resets the reply to empty, removing that field along with any indication that the write concern was not honored.



 Comments   
Comment by Githook User [ 01/May/18 ]

Author:

{'email': 'mathias@10gen.com', 'name': 'Mathias Stearn', 'username': 'RedBeard0531'}

Message: SERVER-34679 Preserve writeConcernError when commands fail by throwing
Branch: master
https://github.com/mongodb/mongo/commit/b6cc5f2d5cf0e13a2163b72e518ad53641db62cb

Generated at Thu Feb 08 04:37:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.