[SERVER-28871] Remove write concern error backwards compatibility for user management commands Created: 19/Apr/17  Updated: 30/Oct/23  Resolved: 03/Dec/18

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

Type: Task Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: Spencer Jackson
Resolution: Fixed Votes: 0
Labels: platforms_security, writeconcern
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by DRIVERS-569 Update handling of write concern erro... Implementing
Related
related to SERVER-22421 Add writeConcernError backwards compa... Closed
Backwards Compatibility: Minor Change
Sprint: Dev Tools 2018-10-22, Dev Tools 2018-11-05, Security 2018-12-03, Security 2018-12-17
Participants:
Linked BF Score: 0

 Description   

Generally speaking, when a command succeeds but fails waiting for write concern, the command response indicates ok:1, but has a writeConcernError field.

When we made it so all commands that write can accept write concern, we finally standardized on that method of reporting write concern errors. User management commands, however, already supported write concern, and they reported errors differently - a failed write concern for them caused the whole command to report ok:0. In 3.4 we continued to provide that behavior for user management commands to preserve backwards compatibility until drivers were all updated to know to always check for the presence of the writeConcernError field. Now that it's been a full release since we made that change, we should be able to remove this bandaid and have user management commands handle write concern errors the same way as any other command.

The bandaid code exists here, and already has a TODO to remove it.



 Comments   
Comment by Githook User [ 03/Dec/18 ]

Author:

{'name': 'Spencer Jackson', 'email': 'spencer.jackson@mongodb.com', 'username': 'spencerjackson'}

Message: SERVER-28871: Remove user management command write concern backwards compatibility
Branch: master
https://github.com/mongodb/mongo/commit/74921ac92c1330f754eed39c8e7148955aca2be9

Comment by Billy Donahue [ 25/Apr/18 ]

We should do this change but do it early in the 4.1 cycle, not as a last minute change to a 4.0 rc.
We'll need some burn-in time to make sure drivers adjust to having user management commands behave like other commands.
That is, returning an ok:1.0 with a writeConcernError block to indicate a WC error might surprise them.

Comment by Githook User [ 25/Apr/18 ]

Author:

{'email': 'dennis.khodyakov@mongodb.com', 'name': 'Denis Khodyakov'}

Message: Revert "SERVER-28871 remove obsolete Command::isUserManagementCommand"

This reverts commit 76bc4f800ba2a103d67fa4600d3946f255927818.
Branch: master
https://github.com/mongodb/mongo/commit/db80e9fbd16df2ef3b357bad4c4c7d9212e57dcf

Comment by Githook User [ 24/Apr/18 ]

Author:

{'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue', 'name': 'Billy Donahue'}

Message: SERVER-28871 remove obsolete Command::isUserManagementCommand
Branch: master
https://github.com/mongodb/mongo/commit/76bc4f800ba2a103d67fa4600d3946f255927818

Comment by Billy Donahue [ 24/Apr/18 ]

https://mongodbcr.appspot.com/200350001/

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