[SERVER-47085] Remove ElectionInProgress (216) from ResumableChangeStreamError Created: 24/Mar/20  Updated: 29/Oct/23  Resolved: 24/Mar/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.4.0-rc0, 4.7.0

Type: Task Priority: Major - P3
Reporter: Lingzhi Deng Assignee: Lingzhi Deng
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
is related to SERVER-46081 Make ElectionInProgress (216) a Retry... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.4
Sprint: Repl 2020-04-06
Participants:

 Description   

Since ElectionInProgress is not a user-visible error code, we should remove the check of ElectionInProgress for ResumableChangeStreamError.

I would also prefer to always stick with the NotMasterError/RetriableError error categories. If we think an error code is client facing and should be retryable, my preference is that we should add that error to the proper category. Special-casing error codes might cause more confusions in the long run.



 Comments   
Comment by Githook User [ 24/Mar/20 ]

Author:

{'name': 'Lingzhi Deng', 'username': 'ldennis', 'email': 'lingzhi.deng@mongodb.com'}

Message: SERVER-47085: Remove ElectionInProgress (216) from ResumableChangeStreamError

(cherry picked from commit 5e3e6c4fd4516cbdbc127f392dc96ec7a791e8c5)
Branch: v4.4
https://github.com/mongodb/mongo/commit/6218a5327fb0e6767b5dd3f88aec1b2178184a13

Comment by Githook User [ 24/Mar/20 ]

Author:

{'name': 'Lingzhi Deng', 'username': 'ldennis', 'email': 'lingzhi.deng@mongodb.com'}

Message: SERVER-47085: Remove ElectionInProgress (216) from ResumableChangeStreamError
Branch: master
https://github.com/mongodb/mongo/commit/5e3e6c4fd4516cbdbc127f392dc96ec7a791e8c5

Comment by Lingzhi Deng [ 24/Mar/20 ]

Yes, I think it is reasonable to backport it. And will do.

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

There is at least one test that relies on this behavior that we'd need to change. It's a little weird though because this new error label was added in 4.4, which hasn't been released yet. Is it possible to backport this change to the 4.4 branch? If not, we can workaround this by ensuring that the test doesn't run on server versions after 4.4. Either way, please mark this ticket "drivers changes needed" when you resolve it.

Comment by Lingzhi Deng [ 24/Mar/20 ]

divjot.arora emily.giurleo I am ready to commit the change to remove the error code ElectionInProgress (216) from ResumableChangeStreamError. But before I do, I want to check in with Drivers in case there are tests in drivers that depends on the error code. Does removing ElectionInProgress (216) from ResumableChangeStreamError sound good to you? Thanks.

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