Skip to content
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

Serialize onCompleteFailure for #9059 #9062

Merged
merged 4 commits into from
Dec 16, 2022

Conversation

gregw
Copy link
Contributor

@gregw gregw commented Dec 16, 2022

Delay onCompleteFailure call until process has returned.

@gregw gregw requested a review from sbordet December 16, 2022 07:23
@sbordet sbordet linked an issue Dec 16, 2022 that may be closed by this pull request
Before, exiting the processing loop would always skip to invoke onCompleteFailure(), causing the callback to not be completed.
Now we fall through and possibly invoke onCompleteFailure() if it was not already invoked.

Updated javadocs.

Code cleanups.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
/**
* Indicates that {@link #process()} has completed the overall job.
* Indicates that {@link #process()} has completed the whole
* iteration successfully.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for the clearer javadoc on Action

@sbordet sbordet marked this pull request as ready for review December 16, 2022 21:48
@gregw gregw merged commit d24a521 into jetty-10.0.x Dec 16, 2022
@gregw gregw deleted the jetty-10-9059-iterating-callback-failure branch December 16, 2022 22:43
gregw added a commit that referenced this pull request Dec 20, 2022
Serialize onCompleteFailure for #9059

* Fixed case where process() throws an exception.
   Before, exiting the processing loop would always skip to invoke onCompleteFailure(), causing the callback to not be completed.
   Now we fall through and possibly invoke onCompleteFailure() if it was not already invoked.

* Updated javadocs.

* Code cleanups.

Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IteratingCallback not serializing close() and failed()
3 participants