-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
IteratingCallback not serializing close() and failed() #9059
Comments
@sbordet We need to handle a call to Experimental branch coming.... |
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 <[email protected]>
@sbordet I will merge forward to 12. Does this need to be cherry-picked back to 9? |
@gregw I think cherry-picking to 9 would be good, it is a stabilization fix that may help 9 too. |
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 <[email protected]>
done |
Jetty version(s)
10+
Description
Thread1 is inside
IC.process()
, acting on some custom state.Thread2 calls
IC.close()
orIC.failed(failure)
, and this may callonCompleteFailure()
directly, which may (for example) reset the custom state, or null it out, etc.Therefore, the contract of IC that it will serialize the processing is not respected, because now 2 threads can access the IC custom state.
We should be more precise at serializing in case of a
close()
call, and possibly introduce aclose(Throwable)
orfail(Throwable)
different fromfailed(Throwable)
if necessary to handle the serialization more precisely.The text was updated successfully, but these errors were encountered: