[SERVER-33823] Duplicate key error E11000 doesn't show the key name on ephemeralForTest storage engine Created: 12/Mar/18  Updated: 11/Oct/18  Resolved: 13/Sep/18

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

Type: Bug Priority: Major - P3
Reporter: Miguel Angel Nieto Assignee: Xiangyu Yao (Inactive)
Resolution: Duplicate Votes: 0
Labels: asya, nyc
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-37070 All storage engines should show the c... Closed
Operating System: ALL
Sprint: Storage NYC 2018-09-24
Participants:
Case:

 Description   

This is the error message in Wiredtiger:

"errmsg" : "E11000 duplicate key error collection: test.some_col index: user_id_1 dup key: { : 1.0 }"

and this in ephemeralForTest:

"errmsg" : "E11000 duplicate key error dup key: { : 1.0 }"

The source code shows that adding the _indexName to the error string is marked as TODO.

// taken from btree_logic.cpp
Status dupKeyError(const BSONObj& key) {
    StringBuilder sb;
    sb << "E11000 duplicate key error ";
    // sb << "index: " << _indexName << " "; // TODO
    sb << "dup key: " << key;
    return Status(ErrorCodes::DuplicateKey, sb.str());
}

Thanks



 Comments   
Comment by Xiangyu Yao (Inactive) [ 13/Sep/18 ]

Fixed in SERVER-37070.

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