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

Creating IgniteAtomicLong from the client node may hang.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None
    • Release Notes Required

    Description

      It looks like, the data structure processor is not properly initialized when a client node connects to a cluster that changes its own state (state transition from the inactive state to active).

      reproducer attached.

      UPDATE
      It seems to me, the root cause of the issue is that joinFut is always completed with false.

      GridClusterStateProcessor.java
          /** {@inheritDoc} */
          @Override public void onStateFinishMessage(ChangeGlobalStateFinishMessage msg) {
              DiscoveryDataClusterState discoClusterState = globalState;
      
              if (msg.requestId().equals(discoClusterState.transitionRequestId())) {
                  ...
                  TransitionOnJoinWaitFuture joinFut = this.joinFut;
      
                  if (joinFut != null)
                      joinFut.onDone(false);
                  ...
              }
              else
                  U.warn(log, "Received state finish message with unexpected ID: " + msg);
          }
      

      On the other hand, this value is used to determine the state of the cluster when a new node joins the cluster

      IgniteKernal.java
          public void start(
                  DiscoveryLocalJoinData joinData = ctx.discovery().localJoin();
      
                  IgniteInternalFuture<Boolean> transitionWaitFut = joinData.transitionWaitFuture();
      
                  ...
                  boolean active;
      
                  if (transitionWaitFut != null) {
                      if (log.isInfoEnabled()) {
                          log.info("Join cluster while cluster state transition is in progress, waiting when transition finish.");
                      }
      
                      active = transitionWaitFut.get();
                  }
                  else
                      active = joinData.active();
      
                  startTimer.finishGlobalStage("Await transition");
                  ...
          }
      

      User list discussion: http://apache-ignite-users.70518.x6.nabble.com/Ignite-client-node-hangs-while-IgniteAtomicLong-is-created-tp33537.html

      Attachments

        1. DataStructuresInitializationTest.java
          5 kB
          Vyacheslav Koptilin

        Issue Links

          Activity

            People

              slava.koptilin Vyacheslav Koptilin
              slava.koptilin Vyacheslav Koptilin
              Vyacheslav Koptilin Vyacheslav Koptilin
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

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