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

MVCC: Possible race on coordinator changing on client reconnection.

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.8
    • mvcc

    Description

      I found that the wrong coordinator can be set in case of client reconnect:

      assert newCrd.topologyVersion().compareTo(curCrd.topologyVersion()) > 0;
      
      java.lang.AssertionError
          at org.apache.ignite.internal.processors.cache.mvcc.MvccProcessorImpl.onCoordinatorChanged(MvccProcessorImpl.java:541)
          at org.apache.ignite.internal.processors.cache.mvcc.MvccProcessorImpl.onLocalJoin(MvccProcessorImpl.java:416)
          at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$4.onDiscovery0(GridDiscoveryManager.java:851)
          at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$4.lambda$onDiscovery$0(GridDiscoveryManager.java:601)
          at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$DiscoveryMessageNotifierWorker.body0(GridDiscoveryManager.java:2681)
          at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$DiscoveryMessageNotifierWorker.body(GridDiscoveryManager.java:2719)
          at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
          at java.lang.Thread.run(Thread.java:748)
      

      I have attached reproducer in PR.

      The main reason is that coordinator can be changed from discovery event thread when the client already disconnect (disconnection processed in notifier thread and change coordinator on onDisconnected method).
      Coordinator can be changed in cases:
      1. notifier disco thread: onDisconnected method
      2. event disco thread: onDiscovery listener.
      and events can be processed with some delay and override coordinator that set in notifier thread.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            NSAmelchev Nikita Amelchev Assign to me
            NSAmelchev Nikita Amelchev
            Votes:
            0 Vote for this issue
            Watchers:
            3 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

              Slack

                Issue deployment