-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[event-hubs] Error handling changes for SDK consistency #6444
Comments
Yes this looks correct to me. Reiterating...all our checkpointstore implementations should throw errors instead of eating them when calling claimOwnership, unless the failure is due to an etag mismatch (since that will get indirectly handled as EventProcessor should see an OwnershipLost eventually) |
I'll need more context to weigh in on the processing loop termination. Come find me to discuss 😀 |
I've got a PR out for the first two points since those seem universal. |
Prior to this change we couldn't tell the difference between "storage is failing for some reason" and "we're just losing to other processors that are attempting to claim partitions". Now an empty list of ownerships is okay and just indicates that we should do nothing this time around. Fixes #6444 minus the the change to exit the processing loop.
Closing this now that the PR is complete. After talking with @bterlson we weren't able to come up with a good reason in the current JS API why user errors would terminate the processing loop. There isn't a great way for us to know which user errors might be considered fatal, which might be recoverable, etc.. and the cost of spinning down the loop and starting it up should be made by the user themselves. PR#6555 addresses the first two points and the fact that processError is mandatory and their errors get routed to it should be enough to for the user to not mistakenly be failing in their event handlers and not notice. |
During our recent review for error handling in EventHubs a few spots showed up as being different than we'd like to change:
(will do)
(might do)
There was an additional discussion about whether this should also terminate the processing loop - some languages do this. That is a larger issue that should be discussed with our architect (@bterlson)
The text was updated successfully, but these errors were encountered: