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
NullPointerException upon writing error response #10014
Comments
@oleschoenburg I'm a bit swarmed currently so I didn't do a very deep dive into this NPE. What I quickly saw is that it originates from the |
Looks like the command api handler returned the error writer but didn't set a error code, which should not be possible 😬 |
Yikes, looks like I made a mess out of We are re-using the readers and writers which is not safe since handlers are async. |
Appears in benchmark that was created after the fix was merged: |
10037: fix: create new readers and writer for every sync request r=oleschoenburg a=oleschoenburg ## Description Applies the fix in #10026 for sync api handlers too. Due to our actor scheduler, even sync handlers can't reuse readers andwriters because `onComplete` on the already completed future doesn't run immediately, causing a data race on the readers and writers when handling concurrent requests. ## Related issues <!-- Which issues are closed by this PR or are related --> closes #10014 Co-authored-by: Ole Schönburg <ole.schoenburg@gmail.com>
10037: fix: create new readers and writer for every sync request r=oleschoenburg a=oleschoenburg ## Description Applies the fix in #10026 for sync api handlers too. Due to our actor scheduler, even sync handlers can't reuse readers andwriters because `onComplete` on the already completed future doesn't run immediately, causing a data race on the readers and writers when handling concurrent requests. ## Related issues <!-- Which issues are closed by this PR or are related --> closes #10014 Co-authored-by: Ole Schönburg <ole.schoenburg@gmail.com>
Describe the bug
The
ErrorResponseWriter
tried to write an error response, but theerrorCode
was null.To Reproduce
I don't know
Expected behavior
No NPE is thrown.
Log/Stacktrace
https://console.cloud.google.com/errors/detail/CNr_jurZ9ZLCzAE;service=zeebe;time=P7D?project=camunda-cloud-240911
Full Stacktrace
Environment:
The text was updated successfully, but these errors were encountered: