Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-11649

Java thin client: ReliableChannel is not so reliable

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8
    • Component/s: thin client
    • Labels:
      None

      Description

      When only one server address is used ReliableChannel don't recover after failure.

      Reproducer:

      public void testSingleNodeFailover() throws Exception {
          try (LocalIgniteCluster cluster = LocalIgniteCluster.start(1);
               IgniteClient client = Ignition.startClient(new ClientConfiguration()
                   .setAddresses(cluster.clientAddresses().iterator().next()))
          ) {
              ObjectName mbeanName = U.makeMBeanName(Ignition.allGrids().get(0).name(), "Clients", "ClientListenerProcessor");
              ClientProcessorMXBean mxBean = MBeanServerInvocationHandler.newProxyInstance(
                  ManagementFactory.getPlatformMBeanServer(), mbeanName, ClientProcessorMXBean.class,true);
      
              ClientCache<Integer, Integer> cache = client.createCache("cache");
      
              // Before fail.
              cache.put(0, 0);
      
              // Fail.
              mxBean.dropAllConnections();
      
              try {
                  cache.put(0, 0);
              }
              catch (Exception expected) {
                  // No-op.
              }
      
              // Recover after fail.
              cache.put(0, 0);
          }
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alex_pl Aleksey Plekhanov
                Reporter:
                alex_pl Aleksey Plekhanov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m