[SERVER-85843] A write operation may fail with NamespaceNotFound if the database has been concurrently dropped (sharding-only) Created: 29/Jan/24  Updated: 01/Feb/24

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: 4.4.0, 5.0.0, 6.0.0, 7.0.0, 7.3.0-rc1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Antonio Fuschetto Assignee: Backlog - Catalog and Routing
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File SERVER-85843.patch    
Issue Links:
Depends
Assigned Teams:
Catalog and Routing
Operating System: ALL
Steps To Reproduce:

See the attached patch file.

Participants:
Linked BF Score: 7
Story Points: 1

 Description   

When a write is targeted, the router ensures the target database is created by using the cluster DDL API. However, if the database is subsequently dropped before the collection refresh in the insert path, the operation fails with NamespaceNotFound error.

A variant of this problem was already fixed in the context of SERVER-83146. However, there are multiple scenarios where the problem can still occur. The management of the time-series collections required multiple paths that must be reviewed in the context of this fix.

The probability of the problem occurring in a real-world scenario is negligible. The cost of the fix is a couple of days at most.


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