Bug 1321705

Summary: Client hangs in a retry loop if the target cache is not defined
Product: [JBoss] JBoss Data Grid 6 Reporter: Osamu Nagano <onagano>
Component: CPP ClientAssignee: Pedro Zapata <pzapataf>
Status: NEW --- QA Contact: Alan Field <afield>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.6.0CC: afield, mgencur, sjacobs
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: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
main.cpp none

Description Osamu Nagano 2016-03-29 01:21:06 UTC
Created attachment 1141049 [details]
main.cpp

Description of problem:
If a C++ Hot Rod client try to connect to a non-existing cache, it will hang at 9th retry and never return.


Version-Release number of selected component (if applicable):
jboss-datagrid-6.6.0-remote-cpp-client-RHEL7-x86_64


How reproducible:
Always.


Steps to Reproduce:
1. Run a standalone JDG server.
2. Compile the attached client, main.cpp (edit the hard-corded server address).
gcc -o main \
     -I /path/to/jboss-datagrid-6.6.0-remote-cpp-client-RHEL7-x86_64/include \
     -L /path/to/jboss-datagrid-6.6.0-remote-cpp-client-RHEL7-x86_64/lib64 \
     -lhotrod -lm -lstdc++ \
     main.cpp
3. Run the client.
LD_LIBRARY_PATH=/path/to/jboss-datagrid-6.6.0-remote-cpp-client-RHEL7-x86_64/lib64 ./main


Actual results:
~~~
1: org.infinispan.server.hotrod.CacheNotFoundException: Cache with name '_' not found amongst the configured caches
2: org.infinispan.server.hotrod.CacheNotFoundException: Cache with name '_' not found amongst the configured caches
3: org.infinispan.server.hotrod.CacheNotFoundException: Cache with name '_' not found amongst the configured caches
4: org.infinispan.server.hotrod.CacheNotFoundException: Cache with name '_' not found amongst the configured caches
5: org.infinispan.server.hotrod.CacheNotFoundException: Cache with name '_' not found amongst the configured caches
6: org.infinispan.server.hotrod.CacheNotFoundException: Cache with name '_' not found amongst the configured caches
7: org.infinispan.server.hotrod.CacheNotFoundException: Cache with name '_' not found amongst the configured caches
8: org.infinispan.server.hotrod.CacheNotFoundException: Cache with name '_' not found amongst the configured caches
9:
~~~


Expected results:
An exception is thrown at the last retry (the default maxRetries is 10).

Comment 1 Osamu Nagano 2016-03-29 01:29:56 UTC
My mistake, maxRetries is not related.  The 10 times loop is hard-coded.  But the question is the same.  Why the loop stops at 9th time?