[SERVER-72134] Incorrect error code for blocked write during tenant migration Created: 14/Dec/22  Updated: 29/Oct/23  Resolved: 19/May/23

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

Type: Bug Priority: Major - P3
Reporter: Christopher Caplinger Assignee: Christopher Caplinger
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Server Serverless 2023-05-29
Participants:

 Description   

confusingly, checkIfCanReadOrBlock is called for a write, which calls into TenantMigrationRecipientAccessBlocker::getCanReadFuture and responds with a ErrorCodes::SnapshotTooOld error code is blocked: https://github.com/10gen/mongo/blob/0a544ab77317cdac47f7239fb251f8256dbbba63/src/mongo/db/repl/tenant_migration_recipient_access_blocker.cpp#L111-L119

additionally, the message states that a Tenant read is blocked, when this can happen for a write.

at the bare minimum, we should switch out the current error code for something more correct and also consider updating the message, updating the names of these methods, and/or adding a comment(s) to clarify that this can be invoked for writes as well.



 Comments   
Comment by Githook User [ 18/May/23 ]

Author:

{'name': 'Christopher Caplinger', 'email': 'christopher.caplinger@mongodb.com', 'username': 'UnicodeSnowman'}

Message: SERVER-72134: Clean up recipient access blocker errors and naming
Branch: master
https://github.com/mongodb/mongo/commit/e5f9817aebfd517ec4ad27c2de5f57f904d35289

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