Hide Forgot
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
Link: Added: This issue depends TEIID-1336
Teiid applied the fix and should be in the ER4.
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")
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
In ER4 - hitRatio always returns a value of 0.0
Link: Added: This issue is related to TEIID-1379
Changes were committed to the 7.1.x product branch and should be in the ER5 release.
In ER6 build - hitRatio is always 0.0
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.
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!
Run 2 queries in step 2, because the 1st query just sets the cache, and subsequent queries change the hit ratio.
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.