[SERVER-60006] Investigate throwing WriteConflictException on EBUSY in WiredTigerSession::getNewCursor Created: 16/Sep/21  Updated: 29/Oct/23  Resolved: 29/Sep/21

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

Type: Improvement Priority: Major - P3
Reporter: Gregory Noma Assignee: Ian Boros
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-60154 Tests can run full validation concurr... Closed
is related to SERVER-63945 test_resharding_test_fixture_shutdown... Closed
is related to SERVER-63946 tenant_migration_donor_resume_on_step... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2021-10-04
Participants:
Linked BF Score: 0

 Description   

When attempting to open a cursor on a WT table returns EBUSY, currently we handle this by throwing a WriteConflictException.

The comment states that this can only occur on the oplog. However, as of lock-free reads, this can now occur for other collections as well.

Additionally, this appears to be the only place where we convert EBUSY to a WriteConflictException. (Typically, WT_ROLLBACK is converted to WriteConflictException and EBUSY is converted to ObjectIsBusy.)

We should update the comment to reflect the current state of things. Additionally, we should evaluate whether it still makes to use WriteConflictException here, or whether ObjectIsBusy should be used instead. If we stick with WriteConflictException, we should document why doing so makes sense here.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 28/Sep/21 ]

Author:

{'name': 'Ian Boros', 'email': 'ian.boros@mongodb.com', 'username': 'borosaurus'}

Message: SERVER-60006 Update comment and error thrown when WT cursor open fails
Branch: master
https://github.com/mongodb/mongo/commit/7b6276324267dc7261de886e9ff1f9eb90d8061b

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