Created attachment 1038802 [details] server.log There is a race condition between AbstractPool and SemaphoreArrayListManagedConnectionPool. https://github.com/ironjacamar/ironjacamar/blob/ironjacamar-1.0.31.Final/core/src/main/java/org/jboss/jca/core/connectionmanager/pool/AbstractPool.java#L354 https://github.com/ironjacamar/ironjacamar/blob/ironjacamar-1.0.31.Final/core/src/main/java/org/jboss/jca/core/connectionmanager/pool/mcp/SemaphoreArrayListManagedConnectionPool.java#L625 AbstractPool flushes the mcp, mcp invokes PoolFiller which works in a separate thread. However AbstractPool is going to unregister the empty mcp and this mcp is no longer used. Then the dead mcp is prefilled in a separate thread by PoolFiller. At next getConnection(), the mcp is re-initialized and prefilled. I've attached logs, prefill enabled and min-size is 10. Boot server, invoke flush-all-connection-in-pool, getConnection() then killed. The prefill is done 3 times where it should be twice.
In 1.0.31.Final: > if (mcp.isEmpty()) > clearMcpPools.add(mcp); In 1.2 branch, commit 956af09c8494d4187db24a253e7e37b5ba5d9779 for JBJCA-1135: > if (mcp.isEmpty() && !isPrefill() && size > 1) > clearMcpPools.add(mcp); We probably need to backport "!isPrefill()" to the 1.0 branch.
Upstream PR sent: https://github.com/ironjacamar/ironjacamar/pull/366
Merged.
Jesper Pedersen <jpederse> updated the status of jira JBJCA-1276 to Resolved
Jesper Pedersen <jpederse> updated the status of jira JBJCA-1276 to Closed
Verified with EAP 6.4.5.CR1.
The fix for this caused a regression: https://bugzilla.redhat.com/show_bug.cgi?id=1277919 Therefore, keeping this reopened for now.
Fix is in 1.0.34, so marking this as MODIFIED: https://github.com/ironjacamar/ironjacamar/commit/1511519f23450e06dd84faaf512ebe37416a8ad4
Verified with EAP 6.4.5.CR2, including the regression previously introduced.
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.