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

Data race when getting index rebuild status

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.9
    • None
    • None

    Description

      Now it is possible data race when getting status of building an index.
      This is possible due to method [1] can invoke earlier [2].

      It can reproduce if modify the code here: org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing#rebuildIndexesFromHash
      But this will not give a 100% repeat of the problem.

      rebuildCacheIdxFut.listen(fut -> {
       Throwable err = fut.error();
      
      if (isNull(err)) {
       try {
       U.sleep(10_000);
       
       markIndexRebuild(cacheName, false);
       }
       catch (Throwable t) {
       err = t;
      
      rebuildCacheIdxFut.onDone(t);
       }
       }
      
      if (nonNull(err))
       U.error(log, "Failed to rebuild indexes for cache: " + cacheName, err);
       });
      

      [1] - org.apache.ignite.internal.IgniteInternalFuture#get()
      [2] - org.apache.ignite.internal.IgniteInternalFuture#listen

      Attachments

        Issue Links

          Activity

            People

              ktkalenko@gridgain.com Kirill Tkalenko
              ktkalenko@gridgain.com Kirill Tkalenko
              Taras Ledkov Taras Ledkov
              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 - 0.5h
                  0.5h