Description of problem: A customer is monitoring a table which is configured as a store of async stringKeyedJdbcStore. When they execute cache.clear(), it removes data from memory (cache.get(key) returns null) but the table entries are left. If the cache store is sync one, the table entries are removed as well. Version-Release number of selected component (if applicable): Infinispan 'Infinium' 6.2.1.Final-redhat-2 How reproducible: Always. Steps to Reproduce: A reproducer is available, which is a REST web app with library mode JDG. 1. Prepare standalone EAP 6.x with "ExampleDS" to persist as follows. <connection-url>jdbc:h2:tcp://localhost/~/tmp/test</connection-url> 2. Start H2 database by the following command. Web interface will be launched as well. Access to the above JDBC URL with username/password "sa/sa". java -cp $JBOSS_HOME/modules/system/layers/base/com/h2database/h2/main/h2*.jar org.h2.tools.Server 3. Build and deploy the attached maven project. The following access pattern exhibit the issue. Actual results: curl "http://localhost:8080/restcache/rest/asyncstore/put/key01/aaa" curl "http://localhost:8080/restcache/rest/asyncstore/clear" curl "http://localhost:8080/restcache/rest/asyncstore/get/key01" The last command returns null properly but table "JDG_asyncstore" contains the data still. Expected results: Replace "asyncstore" with "syncstore" in the URLs. Table "JDG_syncstore" is cleared properly. Additional info: The cache configuration is as follows. Sync one has <async enabled="false"/> and it is the only difference. <namedCache name="asyncstore"> <persistence passivation="false"> <stringKeyedJdbcStore xmlns="urn:infinispan:config:jdbc:6.0" fetchPersistentState="false" ignoreModifications="false" purgeOnStartup="false"> <dataSource jndiUrl="java:jboss/datasources/ExampleDS" /> <stringKeyedTable dropOnExit="false" createOnStart="true" prefix="JDG"> <idColumn name="id" type="VARCHAR2(200)" /> <dataColumn name="datum" type="BLOB" /> <timestampColumn name="version" type="NUMBER" /> </stringKeyedTable> <async enabled="true" /> </stringKeyedJdbcStore> </persistence> </namedCache>
Created attachment 1017796 [details] restcache.zip