Details
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
Attachments
Issue Links
- duplicates
-
SERVER-37070 All storage engines should show the collection name and the index name in the error message of duplicate keys
-
- Closed
-