You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
While operating database, an exceptions is thrown randomly (but very often), here's the stacktrace:
Caused by: java.util.ConcurrentModificationException
at java.base/java.util.ArrayList$Itr.checkForComodification(ArrayList.java:1013)
at java.base/java.util.ArrayList$Itr.next(ArrayList.java:967)
at io.quarkus.reactive.datasource.runtime.ThreadLocalPool.scanForAbandonedConnections(ThreadLocalPool.java:75)
at io.quarkus.reactive.datasource.runtime.ThreadLocalPool.pool(ThreadLocalPool.java:68)
at io.quarkus.reactive.datasource.runtime.ThreadLocalPool.preparedQuery(ThreadLocalPool.java:108)
at io.vertx.mutiny.sqlclient.Pool.preparedQuery(Pool.java:149)
at io.vertx.mutiny.pgclient.PgPool_2d3061477c44a6b700dc3f9c4fe453a846636193_Synthetic_ClientProxy.preparedQuery(PgPool_2d3061477c44a6b700dc3f9c4fe453a846636193_Synthetic_ClientProxy.zig:275)
at com.buguroo.environment.traveler.service.dao.UserCountryDao.forCompanyAndUser(UserCountryDao.java:44)
at com.buguroo.environment.traveler.service.dao.UserCountryDao_Subclass.forCompanyAndUser$$superaccessor3(UserCountryDao_Subclass.zig:589)
at com.buguroo.environment.traveler.service.dao.UserCountryDao_Subclass$$function$$3.apply(UserCountryDao_Subclass$$function$$3.zig:41)
at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:54)
at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorBase.invokeInOurTx(TransactionalInterceptorBase.java:127)
at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorBase.invokeInOurTx(TransactionalInterceptorBase.java:100)
at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorRequired.doIntercept(TransactionalInterceptorRequired.java:32)
at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorBase.intercept(TransactionalInterceptorBase.java:53)
at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorRequired.intercept(TransactionalInterceptorRequired.java:26)
at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorRequired_Bean.intercept(TransactionalInterceptorRequired_Bean.zig:340)
at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:41)
at io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:41)
at io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:32)
at com.buguroo.environment.traveler.service.dao.UserCountryDao_Subclass.forCompanyAndUser(UserCountryDao_Subclass.zig:544)
at com.buguroo.environment.traveler.service.dao.UserCountryDao_ClientProxy.forCompanyAndUser(UserCountryDao_ClientProxy.zig:191)
at com.buguroo.environment.traveler.service.FrequentTravelerService.getOpinion(FrequentTravelerService.java:39)
at com.buguroo.environment.traveler.service.FrequentTravelerService_ClientProxy.getOpinion(FrequentTravelerService_ClientProxy.zig:157)
at com.buguroo.environment.traveler.FrequentTravelerListener.process(FrequentTravelerListener.java:57)
at com.buguroo.environment.traveler.FrequentTravelerListener_Subclass.process$$superaccessor1(FrequentTravelerListener_Subclass.zig:400)
at com.buguroo.environment.traveler.FrequentTravelerListener_Subclass$$function$$1.apply(FrequentTravelerListener_Subclass$$function$$1.zig:33)
at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:54)
at io.smallrye.faulttolerance.FaultToleranceInterceptor.lambda$null$1(FaultToleranceInterceptor.java:178)
... 6 more
From what it seems, the code was introduced in #14134 . In fact the behaviour disappears if I turn back to 1.10.5.
The PR contains a test, but the test does not cover the scenario because it fails only when the "dead" connection is not the last (because it calls close which ends up modifying allConnections).
Expected behavior
Not to throw an exception ;).
However, I'm wondering if I'm doing something wrong in my code because I wouldn't expect pools to be closed this often.
Actual behavior
The added exception is thrown.
To Reproduce
Link to a small reproducer (preferably a Maven project if the issue is not Gradle-specific).
Or attach an archive containing the reproducer to the issue.
Interesting, thanks. This seems to suggest that other integrations we've been testing don't actually close the connections, and I wonder if you really should as they are all reusable within the context of the same event loop.
Describe the bug
While operating database, an exceptions is thrown randomly (but very often), here's the stacktrace:
From what it seems, the code was introduced in #14134 . In fact the behaviour disappears if I turn back to 1.10.5.
The PR contains a test, but the test does not cover the scenario because it fails only when the "dead" connection is not the last (because it calls close which ends up modifying
allConnections
).Expected behavior
Not to throw an exception ;).
However, I'm wondering if I'm doing something wrong in my code because I wouldn't expect pools to be closed this often.
Actual behavior
The added exception is thrown.
To Reproduce
Link to a small reproducer (preferably a Maven project if the issue is not Gradle-specific).
Or attach an archive containing the reproducer to the issue.
Steps to reproduce the behavior:
1.
2.
3.
Configuration
Configuring reactive database connection pooling.
Screenshots
N/A
Environment (please complete the following information):
uname -a
orver
: Linux 5.4.0-54-generic Allow bytecode transformers to run in parallel when using shamrock:run #60-Ubuntu SMP Fri Nov 6 10:37:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linuxjava -version
:mvnw --version
orgradlew --version
):Additional context
N/A
The text was updated successfully, but these errors were encountered: