-
Notifications
You must be signed in to change notification settings - Fork 680
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
1.7.0: concurrent modification exception #1405
Comments
Could you provide stacktrace of the exception? I assume the cause of ConcurrentModificationException is Also thread-unsafe map is good choice for readonly work in multithread env because it has more performance because it doesn't care about sync. |
@aleksandy Yes, we experienced ConcurrentModificationException in DEV mode, but it was also a problem: the application suddenly restarted, sometimes even multiple times. |
@asolntsev, looks like we don't have a choice. The map should be changed to ConcurrentHashMap. I've send PR. |
We haven't tried this version in production, as there are a few show stoppers for us to upgrade (this one and the issue with LoggerInit::access()). Still, it's an issue with dev workflow, as this basically makes live-reload unusable in DEV mode. Of course, you could also just synchronize on write access instead and use a regular HashMap, but for us this isn't really a performance critical part of the application (what are we talking, a few ns maybe?). |
#1405: replace HashMap be ConcurrentHashMap
@JohannesBeranek, could you check if the merged fix solve your issue. And close the issue if so. |
merges #1408 |
@JohannesBeranek what is the issue about LoggerInit::acces, did you create an issue for it, I didn't find it Thanks |
Play version 1.7.0, DEV mode
Looks to me like the amount of concurrentModificationException encountered in DEV mode suddenly skyrocketed. We only had those very very sparsely before, but with play version 1.7.0 they happen about every 10th request.
Always in ApplicationClasses.getApplicationClass. Maybe classes Map should be replaced with a ConcurrentHashMap / add synchronization ?
The text was updated successfully, but these errors were encountered: