Bug 1008763

Summary: PreparedStatementCacheCurrentSize unexpectedly exceeds (min-pool-size * prepared-statement-cache-size)
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Osamu Nagano <onagano>
Component: JCAAssignee: Jesper Pedersen <jpederse>
Status: CLOSED CURRENTRELEASE QA Contact: Vladimir Rastseluev <vrastsel>
Severity: medium Docs Contact: Russell Dickenson <rdickens>
Priority: medium    
Version: 6.0.1CC: jdoyle, pslavice
Target Milestone: ER3   
Target Release: EAP 6.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-15 16:16:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
reproducer none

Description Osamu Nagano 2013-09-17 03:34:13 UTC
Created attachment 798552 [details]
reproducer

Description of problem:
PreparedStatementCacheCurrentSize should be equal to or less than (min-pool-size * prepared-statement-cache-size).  This invariant is sometimes broken.


Version-Release number of selected component:
EAP 6.0.1 (IronJacamar 1.0.13.Final)


How reproducible:
I made a Maven project which contains a single servlet to reproduce the issue.


Steps to Reproduce:
0. Add the following settings to the default ExampleDS in a standalone server.
--
/subsystem=datasources/data-source=ExampleDS:write-attribute(name=max-pool-size,value=2)
/subsystem=datasources/data-source=ExampleDS:write-attribute(name=min-pool-size,value=2)
/subsystem=datasources/data-source=ExampleDS:write-attribute(name=prepared-statements-cache-size,value=10)
--
1. Build the attachment, mvn package.
2. Deploy it, ./target/case00933743repro.war.
3. Access to http://localhost:8080/case00933743repro/.
4. See the statistics.
--
[standalone@localhost:9999 /] ls -l /subsystem=datasources/data-source=ExampleDS/statistics=jdbc
ATTRIBUTE                         VALUE TYPE 
PreparedStatementCacheAccessCount 50    LONG 
PreparedStatementCacheAddCount    50    LONG 
PreparedStatementCacheCurrentSize 24    INT  
PreparedStatementCacheDeleteCount 26    LONG 
PreparedStatementCacheHitCount    0     INT  
PreparedStatementCacheMissCount   0     INT  
--


Actual results:
PreparedStatementCacheCurrentSize is 24.


Expected results:
PreparedStatementCacheCurrentSize should be 20.


Additional info:
This happens as well as the latest relaase.
EAP 6.1.1 (IronJacamar 1.0.19.Final)

Comment 1 Osamu Nagano 2013-09-17 03:38:31 UTC
Jesper already fixed this in the upstream.
https://issues.jboss.org/browse/JBJCA-1083
https://github.com/ironjacamar/ironjacamar/commit/831367dea16f40e6c697ecf1d2fde745d3fac127

So let's include IronJacamar 1.0.21.Final into the next release of EAP, probably 6.2.0.

Comment 2 Jesper Pedersen 2013-09-17 12:21:09 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=1008969

Comment 3 JBoss JIRA Server 2013-09-18 14:29:40 UTC
Jesper Pedersen <jpederse> updated the status of jira JBJCA-1083 to Closed

Comment 6 Vladimir Rastseluev 2013-10-07 07:29:24 UTC
Verified on EAP 6.2.0 ER4