Bug 809459 - Operations with asynchronous jdbc cache store are blocking
Summary: Operations with asynchronous jdbc cache store are blocking
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: JBoss Data Grid 6
Classification: JBoss
Component: unspecified
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Tristan Tarrant
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-03 12:36 UTC by Martin Gencur
Modified: 2012-08-15 14:44 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-04 12:48:39 UTC
Type: Bug


Attachments (Terms of Use)
TRACE log for asynchronous cache store (1.40 MB, text/x-log)
2012-04-03 12:36 UTC, Martin Gencur
no flags Details
Example configuration - standalone.xml using H2 DB (12.41 KB, text/xml)
2012-04-03 12:41 UTC, Martin Gencur
no flags Details

Description Martin Gencur 2012-04-03 12:36:44 UTC
Created attachment 574851 [details]
TRACE log for asynchronous cache store

Description of problem:

Running the following test suggests that storing entries into a cache with a defined async cache store blocks current thread until the entry is really stored in the database: https://svn.devel.redhat.com/repos/jboss-qa/edg/edg-functional-tests/trunk/remote/jdbc-cache-store/async-store-smoke/src/test/java/com/jboss/datagrid/cachestore/jdbc/stringbased/AsyncJdbcStringBasedCacheStoreTest.java

Storing 200 entries via memcached client into a cache with async cache store took on my computer (and remote PostgreSQL DB) ~86 seconds while with synchronous cache store it took ~90 seconds. When I remove the cache store definition completely, it takes hundreds of milliseconds.

Comment 1 Martin Gencur 2012-04-03 12:41:58 UTC
Created attachment 574853 [details]
Example configuration - standalone.xml using H2 DB

Comment 2 Tristan Tarrant 2012-04-03 12:47:45 UTC
I have tested this on H2 and MySQL locally, and could not reproduce it

Comment 3 Martin Gencur 2012-04-03 14:08:48 UTC
Not sure this is reproducible with a locally running database. I've tested with H2 too and the numbers were 223ms for sync and 157ms for async. IMO it should be hundreds of milliseconds even for the remote DB as the calls should return immediately and storing the keys into the cache store should run in the background.


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