-
Notifications
You must be signed in to change notification settings - Fork 68
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
The use of ArrayList in the Journey class is prone to thread concurrency issues #263
Comments
Hello, thank you for the issue and the pull request, we will review it shortly. Is it something you encountered in production? |
I did a little more research into this because I realized I was using an older version of the library (2.10.1). I updated to the latest version (3.2.2) and was unable to reproduce the issue anymore. The reason this is resolved in the latest version is because the Journey's EDIT; If I add a specific tracer for the specific method, this issue is still reproducible. Our configuration for tracers is only based on the * wildcard, so this issue is inadvertently resolved by the method specific tracing. |
The ArrayList in the Journey class is causing thread concurrency issues. If you note the basic example from this Stack Overflow thread:
https://stackoverflow.com/questions/38531332/why-am-getting-null-value-from-arraylist-after-adding-value-using-thread
You'll note that
null
entries can mistakenly get added to the ArrayList. When this happens, the Journey's removeStepByName will throw a NullPointerException when it goes to iterate the list and comes across thisnull
entry.The text was updated successfully, but these errors were encountered: