Bug 780147 (SOA-2520) - EDS adminshell - clearCache() - hitRatio always returns a value of 0.0
Summary: EDS adminshell - clearCache() - hitRatio always returns a value of 0.0
Keywords:
Status: CLOSED NOTABUG
Alias: SOA-2520
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: EDS
Version: 5.1.0.ER3
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 5.1.0.ER5
Assignee: Van Halbert
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-10-29 16:32 UTC by Len DiMaggio
Modified: 2011-01-11 03:01 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
SOA-P 5.1 ER3 build
Last Closed: 2011-01-11 03:01:27 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SOA-2520 0 None None None Never

Description Len DiMaggio 2010-10-29 16:32:40 UTC
project_key: SOA

clearCache() doesn't look like it's doing anything - see below:


groovy:000> connectAsAdmin("mms://localhost:31443", "admin", "admin", "conn-1")
===> null

groovy:000> getCacheStats("QUERY_SERVICE_RESULT_SET_CACHE")                    
===> hitRatio=0.0; totalEntries=0; requestCount=3

groovy:000> clearCache("QUERY_SERVICE_RESULT_SET_CACHE")                       
===> null

groovy:000> getCacheStats("QUERY_SERVICE_RESULT_SET_CACHE")                    
===> hitRatio=0.0; totalEntries=0; requestCount=3

===================

server.log:

2010-10-29 12:13:07,065 DEBUG [org.teiid.TRANSPORT] (New I/O server worker #2-1) processing message:MessageHolder: contents=org.teiid.net.socket.ServiceInvocationStruct@18cf5ea
2010-10-29 12:13:07,065 DEBUG [org.teiid.SECURITY] (New I/O server worker #2-1) Ping MLwHWKFcHgcq
2010-10-29 12:13:07,065 DEBUG [org.teiid.TRANSPORT] (New I/O server worker #2-1)  message: MessageHolder: contents=null for request ID:38
2010-10-29 12:13:07,067 DEBUG [org.teiid.TRANSPORT] (New I/O server worker #2-1) processing message:MessageHolder: contents=org.teiid.net.socket.ServiceInvocationStruct@c171b7
2010-10-29 12:13:07,067 DEBUG [org.teiid.ADMIN_API] (New I/O server worker #2-1) before clearCache:org.teiid.adminapi.jboss.Admin@1a42c71(QUERY_SERVICE_RESULT_SET_CACHE)
2010-10-29 12:13:07,067 DEBUG [org.teiid.ADMIN_API] (New I/O server worker #2-1) after clearCache : null
2010-10-29 12:13:07,067 DEBUG [org.teiid.TRANSPORT] (New I/O server worker #2-1)  message: MessageHolder: contents=null for request ID:39

Comment 1 Van Halbert 2010-10-29 16:42:35 UTC
Link: Added: This issue depends TEIID-1336


Comment 2 Van Halbert 2010-10-29 21:22:35 UTC
Teiid applied the fix and should be in the ER4.

Comment 3 Len DiMaggio 2010-11-02 18:13:33 UTC
The issue was due to a test coding issue - the problem was that the connection URL needed the "resultSetCacheMode=true" property

Sql.newInstance("jdbc:teiid:weather@mm://localhost:31000;resultSetCacheMode=true", "admin","teiid","org.teiid.jdbc.TeiidDriver")

Comment 4 Len DiMaggio 2010-11-02 18:19:57 UTC
After setting the "resultSetCacheMode=true" property - seeing issues where:

* requestCount is not reset when the cache is cleared
* hitRatio is not changed forma value of 0.0 

Will retest with ER4

Comment 5 Len DiMaggio 2010-11-18 21:57:09 UTC
In ER4 - hitRatio always returns a value of 0.0 

Comment 6 Van Halbert 2010-11-24 19:11:11 UTC
Link: Added: This issue is related to TEIID-1379


Comment 7 Van Halbert 2010-12-03 17:25:58 UTC
Changes were committed to the 7.1.x product branch and should be in the ER5 release.

Comment 8 Len DiMaggio 2011-01-06 18:19:58 UTC
In ER6 build - hitRatio is always 0.0

Comment 10 Van Halbert 2011-01-10 16:46:24 UTC
Based on order of steps, when the clearCache(..) was issued, the stats are also cleared.   And since no query was issued between clearing cache and getting stats, the hitRatio will be zero.     I think there's misunderstanding on what happens to the stats when clearCache(...) is called, and that is all the stats are cleared when its called, not just the data in the cache.

I think this jira can be resolved.

Comment 11 Len DiMaggio 2011-01-10 17:49:02 UTC
In this sequence:

1) execute getCacheStats("QUERY_SERVICE_RESULT_SET_CACHE")
2) run a query - for example - the weather VDB example
3) execute getCacheStats("QUERY_SERVICE_RESULT_SET_CACHE") - record the numbers
4) execute clearCache("QUERY_SERVICE_RESULT_SET_CACHE")
5) execute getCacheStats("QUERY_SERVICE_RESULT_SET_CACHE") - record the numbers

Would you expect to see a non-zero value for the hitRatio at step 3?   Thx!



Comment 12 Van Halbert 2011-01-10 18:18:29 UTC
Run 2 queries in step 2, because the 1st query just sets the cache, and subsequent queries change the hit ratio.

Comment 13 Len DiMaggio 2011-01-11 03:01:27 UTC
Not a  bug as logged - I am now seeing number such as:

hitRatio=2.941176470588235; totalEntries=1; requestCount=34

There may be a different issue here - I have not yet been able to generate reliable/consistent hitRatio numbers - if this is a bug, I will log a separate JIRA.


Note You need to log in before you can comment on or make changes to this bug.