[SERVER-51118] DBDirectClient writes convert all NotPrimaryErrors to NotWriteablePrimary Created: 23/Sep/20  Updated: 06/Dec/22  Resolved: 01/Aug/22

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

Type: Task Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: Backlog - Replication Team
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Assigned Teams:
Replication
Participants:

 Description   

this block swallows the specific code for a given NotPrimaryError and converts it to a generic NotWriteablePrimary error, losing the context of the specific code and error message that causes the original error. This code path seems to be activated by DBDirectClient, making it mask potentially useful error information.



 Comments   
Comment by Blake Oler [ 28/Jul/22 ]

Assigning to repl since repl is one of the main consumers here, and would know the impact better than we would. CCing opal.hoyt@mongodb.com

Comment by Lauren Lewis (Inactive) [ 21/Dec/21 ]

We haven’t heard back from you in at least 1 year, so I'm going to close this ticket. If this is still an issue for you, please provide additional information and we will reopen the ticket.

Comment by Spencer Brody (Inactive) [ 23/Sep/20 ]

I encountered this in a unit test where I was trying to assert a specific error code (InterruptedDueToReplStateChange) but kept getting back NotWriteablePrimary. It took me a long time to figure out what the actual problem was. I suspect this can also happen in production code that uses DBDirectClient to do database writes

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