-
-
Notifications
You must be signed in to change notification settings - Fork 261
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
Problem noticed in 13.17.1 #3033
Comments
There is a version Note that this is a 4 digit version number (and not the usual 3). I did that to release it quickly and there was no matching release of ebean-agent, ebean-gradle-plugin, ebean-maven-plugin etc - we need to just use 13.17.1 version of those. I will add that fix and release a full 13.17.2 version of everything shortly. Also, thanks for the bug report. Cheers, Rob. |
Thanks for the quick reply |
java.util.ConcurrentModificationException at java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1493) at java.base/java.util.HashMap$KeyIterator.next(HashMap.java:1516) at java.base/java.util.AbstractCollection.toString(AbstractCollection.java:472) at java.base/java.lang.String.valueOf(String.java:2951) at io.ebeaninternal.server.core.DefaultBeanLoader.loadBean(DefaultBeanLoader.java:134) at io.ebeaninternal.server.core.DefaultServer.loadBean(DefaultServer.java:475) at io.ebeaninternal.server.loadcontext.DLoadBeanContext$LoadBuffer.loadBean(DLoadBeanContext.java:217) at io.ebean.bean.InterceptReadWrite.loadBeanInternal(InterceptReadWrite.java:742) at io.ebean.bean.InterceptReadWrite.loadBean(InterceptReadWrite.java:724) at io.ebean.bean.InterceptReadWrite.preGetter(InterceptReadWrite.java:837) at ...
#3033 - Fix for ConcurrentModificationException introduced in 13.17.1
Discussed in #3032
Originally posted by yhinnach April 19, 2023
Hi @rbygrave we were using ebean orm 13.17.0 and started noticing this problem in our application after we upgraded to 13.17.1
It looks like a map is getting toStringed and modified at the same time. This seems to be a map that ebean maintains so we are not sure how to resolve this while remaining on 13.17.1. So for now we rolled back to 13.17.0
It wasn't obvious why this problem was happening after the upgrade so we looked at the change log:
13.17.0...13.17.1
There was a change made to DefaultBeanLoader.java in 13.17.1 which is probably related. This was added:
final String batchBefore = String.valueOf(batch);
and used below:Would it be possible to make a change on your end to wrap
final String batchBefore = String.valueOf(batch);
inside an if condition that checks if DEBUG is enabled for "markAsDeleted" ? Presumably DEBUG would not be enabled in our environment so we wouldn't try to serialize the map to a String and not execute the problematic codepath. It's also probably a good thing for performance to not incur the cost of that line regardless of whether DEBUG is on or not. This wouldn't resolve the root cause, but it would probably address our problem if by default ebean orm doesn't run in DEBUG mode for "markAsDeleted".Please let me know if it makes sense and if a fix could be released for this.
Thank you,
Yassine
The text was updated successfully, but these errors were encountered: