[SERVER-46081] Make ElectionInProgress (216) a RetryableWriteError Created: 11/Feb/20  Updated: 24/Mar/20  Resolved: 24/Mar/20

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

Type: Improvement Priority: Minor - P4
Reporter: Emily Giurleo (Inactive) Assignee: Lingzhi Deng
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-47085 Remove ElectionInProgress (216) from ... Closed
related to SERVER-45505 Add ResumableChangeStreamError error ... Closed
Sprint: Repl 2020-04-06
Participants:

 Description   

There is an overlap in the errors that have the ResumableChangeStream error label and the RetryableWriteError label added to them.

Currently, ElectionInProgress errors only have the ResumableChangeStream error label added to them (code here), which makes me think that this error should also be considered a retryable write error by the driver.

I propose including this error in the list of error codes that have the RetryableWriteError label added to them.



 Comments   
Comment by Lingzhi Deng [ 24/Mar/20 ]

Closing as "Won't Fix". I filed SERVER-47085 to remove ElectionInProgress from ResumableChangeStreamError rather than making it a RetryableWriteError.

Comment by Judah Schvimer [ 24/Mar/20 ]

SGTM.

Comment by Lingzhi Deng [ 24/Mar/20 ]

Since ElectionInProgress is not a user-visible error code, my inclination would be to close this as "Won't fix". judah.schvimer, does this sound good to you? And maybe we should also file a ticket (or repurpose this one) to remove the check of ElectionInProgress for ResumableChangeStreamError.

Comment by Divjot Arora (Inactive) [ 09/Mar/20 ]

judah.schvimer This was something I brought up to emily.giurleo. In SERVER-45505, the Query team introduced a label for change streams similar to RetryableWriteError to indicate if a change stream error is resumable. The code for the new label checks for the ElectionInProgress error code (https://github.com/mongodb/mongo/blob/master/src/mongo/db/error_labels.cpp#L85), so I was wondering if this was needed for retryable writes as well.

Comment by Judah Schvimer [ 09/Mar/20 ]

emily.giurleo, we're unsure if this can be returned to a user, and if so if it can be returned on a retryable write operation. How did you discover this?

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