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

Deadlock in TableManager#updateAssignmentInternal()

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0
    • None

    Description

      Currently, TableManager#updateAssignmentsInternal is fully synchronous. The scenario is as follows:

      1. updateAssignmentsInternal starts a RAFT group for a partition
      2. FSMCallerImpl finds out that its applied index is below the group committed index, so it starts to apply the missing log entries in its init() method (this is still done synchronously)
      3. While doing so, it invokes PartitionListener, which tries to execute an insert
      4. To make an insert, a PK is needed, so it the insertion code tries to obtain a PK from its future like this: pkFuture.join()
      5. That future is completed from IndexManager#createIndexLocally(), which is invoked by ConfigurationNotifier later than updateassignmentsInternal in the same thread
      6. As a result, the PK future cannot be completed before the sync updateAssignmentsInternal finishes its job and returns, and it cannot finish its job before the PK future is completed

      We should make updateAssignmentsInternal async. 

      Attachments

        Issue Links

        Activity

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

          People

            rpuch Roman Puchkovskiy
            rpuch Roman Puchkovskiy
            Votes:
            0 Vote for this issue
            Watchers:
            1 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 - 0.5h
                0.5h

                Slack

                  Issue deployment