[SERVER-21254] Get rid of the DuplicateKeyValue error code Created: 02/Nov/15  Updated: 08/Sep/20  Resolved: 10/Jul/20

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

Type: Improvement Priority: Minor - P4
Reporter: Kaloian Manassiev Assignee: Bynn Lee
Resolution: Done Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-23590 Prevent propagation of DuplicateKeyVa... Closed
Backwards Compatibility: Fully Compatible
Sprint: Integration F (02/01/16), Integration 10 (02/22/16), Execution Team 2020-07-13, Execution Team 2020-07-27
Participants:
Linked BF Score: 0

 Description   

Everywhere in the code and in the documentation we use error code 11000 to indicate duplicate key errors. In the MMAP V1's btree code, we could return error code 84 (DuplicateKeyValue) and this might get propagated to the caller.

We should get rid of error code 84.



 Comments   
Comment by Githook User [ 10/Jul/20 ]

Author:

{'name': 'Bynn Lee', 'email': 'bynn.lee@mongodb.com', 'username': 'bynn'}

Message: SERVER-21254 Get rid of the DuplicateKeyValue error code
Branch: master
https://github.com/mongodb/mongo/commit/461b2dee7d731d5a9cf5dd5000d73536bb534b56

Comment by James Wahlin [ 06/Nov/18 ]

Reopening to consider deprecating the DuplicateKeyValue error and removing dead code from index_access_method.cpp that uses it:

james@james:~/mongo$ git grep DuplicateKeyValue
src/mongo/base/error_codes.err:error_code("DuplicateKeyValue", 84)
src/mongo/db/index/index_access_method.cpp:    if (status == ErrorCodes::DuplicateKeyValue && !_btreeState->isReady(opCtx)) {
src/mongo/db/index/index_access_method.h:     * in the event that a non-fatal 'ErrorCodes::DuplicateKeyValue' is encountered during a

Comment by Eric Milkie [ 27/Oct/16 ]

Based on the code review, I think we will not get to this unless MMAP development is revived.

Comment by Kyle Suarez [ 26/Oct/16 ]

I'm putting this on the Storage team backlog for future consideration. In code review for this ticket, we decided at the time that it wasn't worth the complexity and risk implementing this change.

Generated at Thu Feb 08 03:56:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.