-
-
Notifications
You must be signed in to change notification settings - Fork 263
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
ConcurrentModificationException through async getTotalCount #3319
Comments
Is there any explicit transaction that spans the |
Looking at this part:
The thought is that ... we don't really want this Said differently ... the "async findCount running in background" query is a special case and should never trigger |
You seems right ! Is my understanding correct ? |
Yes. That is what I think is happening here. The fix I'm going to push up is that future queries (findFutureCount, findFutureList, findFutureIds) do NOT trigger a flush of the batched prepared statement holder. |
…3319 This change is that findFutureCount, findFutureList, findFutureIds do not trigger a flush on BatchedPstmtHolder. This is to address the possible ConcurrentModificationException that could occur at BatchedPstmtHolder.closeStatements(BatchedPstmtHolder.java:153)
(fix) Future queries do not trigger flush on BatchedPstmtHolder for #3319
In our code, we load the query count in background to enhance server performance. However, in some case we receive a Sentry from production containing
ConcurrentModificationException
.We tried to reproduce this error locally without success.
Note : This happen when the specific code is called on a burst. (Thousands of call in few seconds)
Note 2 : We can see the query associated to method
getList
in database logs but not the query associated togetTotalCount
.Current version used :
Ebean : 13.22.0-jakarta
Expected behavior
There should not be any concurreny problem when calling
getTotalCount
onPagedList
.Actual behavior
We are not sure if the bug come from the way we use
Ebean
or of it is intenal to the library.Steps to reproduce
Thanks in advance for your valuable insights.
Yours faithfully,
LCDP
The text was updated successfully, but these errors were encountered: