[SERVER-33825] the E11000 duplicate key error looks different on each storage engine Created: 12/Mar/18  Updated: 06/Dec/22  Resolved: 14/Sep/18

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

Type: Bug Priority: Major - P3
Reporter: Miguel Angel Nieto Assignee: Backlog - Storage Execution Team
Resolution: Duplicate Votes: 0
Labels: None
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
Assigned Teams:
Storage Execution
Operating System: ALL
Participants:

 Description   

The ouput message for the 11000 should be the same regardless of the storage engine, but it is implemented different on each storage engine. For example:

ephemeralForTest:

"errmsg" : "E11000 duplicate key error dup key: { : 1.0 }",
"op" : {
	"_id" : ObjectId("5aa6ae9c39ecb419fc039661"),
	"user_id" : 1
}

WiredTiger:

"errmsg" : "E11000 duplicate key error collection: test.some_col index: user_id_1 dup key: { : 1.0 }",
"op" : {
	"_id" : ObjectId("5aa6b0f328382ba2890dc449"),
	"user_id" : 1
}

mmapv1:

"errmsg" : "E11000 duplicate key error index: test.some_col.$user_id_1 dup key: { : 1.0 }",
"op" : {
	"_id" : ObjectId("5aa6b12826491c753448b588"),
	"user_id" : 1
}



 Comments   
Comment by Miguel Angel Nieto [ 27/Mar/18 ]

ian.whalen yes, I am trying to parse. That is the issue. With the current implementation, you would need different ways to parse the same error, depending on the storage engine. The output should be similar to make the experience consistent across different storage engines.

Comment by Ian Whalen (Inactive) [ 16/Mar/18 ]

miguel.nieto are you trying to parse these strings? Or is this an issue for some other reason?

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