[fix][io] Not restart instance when kafka source poll exception.#20795
Merged
shibd merged 2 commits intoapache:masterfrom Jul 13, 2023
Merged
[fix][io] Not restart instance when kafka source poll exception.#20795shibd merged 2 commits intoapache:masterfrom
shibd merged 2 commits intoapache:masterfrom
Conversation
freeznet
approved these changes
Jul 13, 2023
Technoboy-
reviewed
Jul 13, 2023
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #20795 +/- ##
=============================================
+ Coverage 36.82% 73.12% +36.30%
- Complexity 12123 32128 +20005
=============================================
Files 1689 1867 +178
Lines 129452 139047 +9595
Branches 14123 15299 +1176
=============================================
+ Hits 47675 101685 +54010
+ Misses 75465 29303 -46162
- Partials 6312 8059 +1747
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
poorbarcode
approved these changes
Jul 13, 2023
RobertIndie
approved these changes
Jul 13, 2023
Member
Author
|
@Technoboy- @poorbarcode Thanks for the feedback. About this comment: #20795 (comment) I refactor the start logic:
PTAL. |
This was referenced Jul 16, 2023
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
When Kafka source poll message exception, it will throw it to the function framework, and not trigger the restart function instance.
After #20424, it just closes the Kafka source connector poll thread, and not will trigger restart instance.
Modifications
notifyErrorto notify this exception, and when the function framework next callsconsumer.readmethod, it will trigger instance restart.Verifying this change
closeConnectorWhenUnexpectedExceptionThrownTestto cover it.Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository