Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-32783

CollectionCloner::shutdown() should not block on resetting _verifyCollectionDroppedScheduler

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.6.3, 3.7.2
    • Replication
    • Fully Compatible
    • ALL
    • Repl 2018-01-29
    • 0

    Description

      CollectionCloner::shutdown() may block waiting for the implicit join inside RemoteCommandRetryScheduler's destructor (while calling reset() in "_verifyCollectionDroppedScheduler").

      https://github.com/mongodb/mongo/blob/cec131017b16e12b993ef8c90733feed4081fe0d/src/mongo/db/repl/collection_cloner.cpp?#L259

      collection_cloner.cpp

      void CollectionCloner::_cancelRemainingWork_inlock() {
          if (_arm) {
              Client::initThreadIfNotAlready();
              _killArmHandle = _arm->kill(cc().getOperationContext());
          }
          _countScheduler.shutdown();
          _listIndexesFetcher.shutdown();
          if (_establishCollectionCursorsScheduler) {
              _establishCollectionCursorsScheduler->shutdown();
          }
          if (_verifyCollectionDroppedScheduler) {
              _verifyCollectionDroppedScheduler->shutdown();
              _verifyCollectionDroppedScheduler.reset();
          }
          _dbWorkTaskRunner.cancel();
      }

      Attachments

        Issue Links

          Activity

            People

              benety.goh@mongodb.com Benety Goh
              benety.goh@mongodb.com Benety Goh
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: