[SERVER-60252] `findAndModify` does not retry on unique index violations Created: 27/Sep/21  Updated: 29/Sep/21  Resolved: 29/Sep/21

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

Type: Bug Priority: Major - P3
Reporter: Jordi Salvat i Alabart Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-47212 Retry full upsert path when duplicate... Closed
Operating System: ALL
Steps To Reproduce:

 

 

Participants:

 Description   

`findAndModify` is still throwing "E11000 duplicate key error" even in cases where all the conditions outlined in SERVER-14322 are fulfilled.

This has been confirmed by 3 independent users – see comments https://jira.mongodb.org/browse/SERVER-14322?focusedCommentId=4035914&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-4035914 and following.

Maybe SERVER-37124 was implemented for `update` but not for `findAndModify`?



 Comments   
Comment by Jordi Salvat i Alabart [ 29/Sep/21 ]

Thanks and apologies for not finding the dupe.

Comment by Edwin Zhou [ 29/Sep/21 ]

Hi jordi@mixmax.com,

As James highlights in SERVER-14322, SERVER-47212 tracks this issue for the findAndModify command, so I will close this as a duplicate of SERVER-47212. The fix is currently available in MongoDB 5.0, but was deemed as risky to backport to 4.4 or earlier. I recommend upgrading to MongoDB 5.0 to resolve this issue. If you need further assistance troubleshooting, I encourage you to ask our community by posting on the MongoDB Developer Community Forums.

Best,
Edwin

Generated at Thu Feb 08 05:49:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.