-
-
Notifications
You must be signed in to change notification settings - Fork 138
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
Smile
decoding issue with NonBlockingByteArrayParser
, concurrency
#384
Comments
Thank you for reporting this, @simondaudin -- and especially for providing the reproduction! Without looking too deep, based on failure and test code, it does seem like a legit bug somewhere and not incorrect usage. |
Hello, thanks for the response. I actually got curious and went digging a little bit. I tried two solutions that both worked:
In the first solution, we only have one instance of |
This may be due to earlier assumptions that parser instances were bound 1-to-1 on threads, and as such buffer recyclers would work without explicit synchronization as long as But I suspect not for So this gives a reasonable idea that adding unfortunate-but-now-necessary locking is probably needed. |
Thanks for the information ! |
Smile
decoding issue with NonBlockingByteArrayParser
, concurrency
Hi there
I noticed an error when using SMILE NonBlockingByteArrayParser in an asynchronous environment (in an HTTP environment).
I managed to reproduce the error in a local test and to propose a "simple" test that produce the error.
Jackson version: 2.15.2 (and before)
Here is the failing test
Here is the error it produces
I noticed 3 things:
SmileFactore
byJsonFactory
-> no errorsupplyAsync
(so same thread) -> no errorExecutorService executorService = Executors.newFixedThreadPool(1);
-> no errorI didn't take the time to track deep in jackson, but it seemed that there was some trouble with the
seenNames
being empty when it should not have been.I don't know if maybe it should not be used this way or if it is a legit error.
Thanks
The text was updated successfully, but these errors were encountered: