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

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

    • Fully Compatible
    • ALL
    • Repl 2018-01-29
    • 0

      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();
      }

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

              Created:
              Updated:
              Resolved: