Uploaded image for project: 'Red Hat Data Grid'
  1. Red Hat Data Grid
  2. JDG-2949

Hotrod client will do retries even if max_retry==0

XMLWordPrintable

    • Workaround Exists
    • Hide

      Update to 7.3.z
      The client side can be used with the 7.3 bits and connect a server with a legacy version.

      Show
      Update to 7.3.z The client side can be used with the 7.3 bits and connect a server with a legacy version.
    • Hide

      Use a simple HR client to connect a server (no custer here)

      Code like followed:

      <code>
      ConfigurationBuilder remoteBuilder = new ConfigurationBuilder();
      remoteBuilder.addServer().host(host).port(Integer.parseInt(port));
      remoteBuilder.maxRetries(0).socketTimeout(3000);
      //remoteBuilder.protocolVersion("2.5");
      remoteCacheManager = new RemoteCacheManager(remoteBuilder.build());
      remoteCache = remoteCacheManager.getCache("test");

      remoteCache.put("test","test entry");

      log.info("stop server I wait for 10 sec");
      try

      { Thread.sleep(10000); }

      catch (InterruptedException e) {
      }
      long start = System.currentTimeMillis();
      log.info("run -> " + new Date(start));
      try

      { System.out.println("test entry is " + remoteCache.get("test")); }

      finally

      { long end = System.currentTimeMillis(); log.info("done -> " + new Date(end)); log.info(" -> " + (end-start)); }
      Show
      Use a simple HR client to connect a server (no custer here) Code like followed: <code> ConfigurationBuilder remoteBuilder = new ConfigurationBuilder(); remoteBuilder.addServer().host(host).port(Integer.parseInt(port)); remoteBuilder.maxRetries(0).socketTimeout(3000); //remoteBuilder.protocolVersion("2.5"); remoteCacheManager = new RemoteCacheManager(remoteBuilder.build()); remoteCache = remoteCacheManager.getCache("test"); remoteCache.put("test","test entry"); log.info("stop server I wait for 10 sec"); try { Thread.sleep(10000); } catch (InterruptedException e) { } long start = System.currentTimeMillis(); log.info("run -> " + new Date(start)); try { System.out.println("test entry is " + remoteCache.get("test")); } finally { long end = System.currentTimeMillis(); log.info("done -> " + new Date(end)); log.info(" -> " + (end-start)); }
    • DataGrid Sprint #31

      if a Java hotrod client will use the following properties

      infinispan.client.hotrod.socket_timeout = 3000
      infinispan.client.hotrod.max_retries = 0
      AKA
      remoteBuilder.maxRetries(0).socketTimeout(3000);

      the behaviour is somewhat different and the client will not fail after 3000ms as expected if the server is not responsive.

      scenario 1 failureWithSuspending.log
      Client will use the properties and do put; after that the server is suspended by CTRL-Z; client will do a get and fail after 6sec; 3sec to fail and another 3 to retry the connection (which is unexpected)

      scenario 2 failureWithDisconnect.log
      Client will use the properties and do put; after that the server get disconnected by cutting the network cable; then client will do a get and fail after 37sec;seems that it will fail for the first read, and fall back to 10 retries to get a new connection as the IP might not be reachable

            rhn-support-wfink Wolf Fink
            rhn-support-wfink Wolf Fink
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: