Bug 745869 (EDG-64)

Summary: HotRod RemoteCacheManager returns non-null value for non-existent cache
Product: [JBoss] JBoss Data Grid 5 Reporter: Richard Achmatowicz <rachmato>
Component: InfinispanAssignee: Default User <jbpapp-maint>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: galder.zamarreno, rachmato
Target Milestone: ---   
Target Release: EAP 5.1.0 EDG TP   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/EDG-64
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-23 11:55:47 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:

Description Richard Achmatowicz 2011-03-22 14:05:16 UTC
project_key: EDG

RemoteCacheManager rcm = new RemoteCacheManager() ;
RemoteCache rc = rcm.getCache("nonExistentCache") ;

The value rc != null.

See HotRodClientRemoteCacheManagerTestCase.testGetNonExistentCache()

Comment 1 Galder Zamarreño 2011-03-22 15:22:08 UTC
Richard, isn't that throwing an exception? That I believe is what is happening with current behaivour, it should be returning HotRodClientException, see https://github.com/infinispan/infinispan/blob/master/client/hotrod-client/src/test/java/org/infinispan/client/hotrod/RemoteCacheManagerTest.java#L96

Now, this will change in in 5.0: ISPN-990

Comment 2 Galder Zamarreño 2011-03-22 15:23:06 UTC
Link: Added: This issue is related to ISPN-990


Comment 3 Richard Achmatowicz 2011-03-22 18:33:03 UTC
Hi Galder

No, no exception is being thrown. Also, the javadoc for 4.2.1 does not mention anything about throwing an exception:
http://docs.jboss.org/infinispan/4.2/apidocs/org/infinispan/client/hotrod/RemoteCacheManager.html#getCache%28boolean%29



Comment 4 Galder Zamarreño 2011-03-23 11:55:02 UTC
Right, I see the mismatch. In 4.2.x, the error will the thrown when a put or similar operation is executed against the non-existent cache. I can't change the API assumptions in 4.2.x but for 5.x, getCache() will return null in this scenarios.

I'm closing this for the time being.