Bug 801102

Summary: socket-timeout for remote-store does not work correctly with JDK 7 64 bit
Product: [JBoss] JBoss Data Grid 6 Reporter: Martin Gencur <mgencur>
Component: unspecifiedAssignee: Tristan Tarrant <ttarrant>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: jdg-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-08 11:10:52 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:
Embargoed:
Attachments:
Description Flags
DEBUG server log none

Description Martin Gencur 2012-03-07 16:53:21 UTC
Description of problem:

When I set a socket-timeout to 1 and expect the TimeoutException to be thrown when a key goes to the remote-store (I have passivation enabled), the socket-timeout seems to affect HotRod client calls even when the key is not supposed to be evicted yet:

(Win 2k8 R2 64bit)
https://hudson.qa.jboss.com/hudson/view/EDG6/view/EDG-REPORTS-FUNC/job/edg-60-functional-tests-windows-udp/jdk=java17_default,label=dev98-W2k8r2-x86_64/lastCompletedBuild/testReport/org.jboss.test.cluster.datagrid.remotestore/RemoteCacheStoreTest/testSocketTimeoutForRemoteStore/

(RHEL5_x86_64)
https://hudson.qa.jboss.com/hudson/view/EDG6/view/EDG-REPORTS-FUNC/job/edg-60-functional-tests-rhel-udp/jdk=java17_default,label=RHEL5_x86_64/49/testReport/junit/org.jboss.test.cluster.datagrid.remotestore/RemoteCacheStoreTest/testSocketTimeoutForRemoteStore/

It seems like passivation got accidentally disabled and entries went to cache store even though they should not.

I was verifying this locally on windows machines - I tried many times and always got the same exception.

How reproducible:

Run remote-cache-store tests from edg-functional-tests. The failing test can be found at https://svn.devel.redhat.com/repos/jboss-qa/edg/edg-functional-tests/trunk/remote-cache-store/src/test/java/org/jboss/test/cluster/datagrid/remotestore/RemoteCacheStoreTest.java and settings for infinispan at src/test/resources of the module.

Comment 1 Martin Gencur 2012-03-07 17:34:19 UTC
I was able to reproduce it also with JDK 1.6.0_24 64bit so this might be related to Windows generally.

Comment 2 Martin Gencur 2012-03-08 09:14:49 UTC
Hmm, the same happens with SUN JDK 1.7.0_02 32bit on Win 2008 32bit.

Comment 3 Martin Gencur 2012-03-08 10:17:55 UTC
Created attachment 568560 [details]
DEBUG server log

The debug log shows exception that is thrown on node which has remote-store defined. But the exception is thrown when the following line is called and this should not happen: 
rc1.put("k1", sb.toString());

Comment 4 Tristan Tarrant 2012-03-08 11:10:52 UTC
In passivation mode, caches will always invoke a remove() operation on the cache store for every operation, even though no eviction is happening yet. This is to avoid inconsistency errors between what is in memory and what might already be in the store.