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

Race between completing table creation and stopping TableManager

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
    • 3.0.0-beta1
    • None

    Description

      As IGNITE-17048 demonstrates, our tests sometimes fail with message like the following:

      java.lang.AssertionError: Raft groups are still running

      The leftover Raft groups always relate to table partitions (and NOT metastorage/cmg).

      It looks like this can happen due to TableManager.stop() being called before some table creation is completed (on some Ignite node). As a result, TableManager.stop() does not see this table, so the table does not get stopped, and its Raft groups are left forever.

      Adding a delay to table creation completion

      public void onSqlSchemaReady(long causalityToken) {
          if (Math.random() < 0.33) {
              try

      {             Thread.sleep(1000);         }

      catch (InterruptedException e)

      {             // ignore         }

          }

          LOG.info("SCHEMA READY FOR " + causalityToken);

          tablesByIdVv.complete(causalityToken);
      }

      makes the failure manifest itself easily.

      The reproducer is in https://github.com/gridgain/apache-ignite-3/tree/ignite-17286-repr

      To run the reproducer, just run ItComputeTest.executesColocatedByClassNameWithTupleKey()

      It usually takes less than 10 iterations to bump into the assertion.

      UPD:
      As a result, a set of busylock were added to the table creation flow, in places like SqlSchemaManagerImpl , SchemaManager and others. Also, added logic of stopping resources in case of stopping node in the middle of the table creation flow

      Attachments

        Issue Links

        Activity

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

          People

            maliev Mirza Aliev Assign to me
            rpuch Roman Puchkovskiy
            Votes:
            0 Vote for this issue
            Watchers:
            4 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