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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.3, 3.7.2
    • Component/s: Replication
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Repl 2018-01-29
    • Linked BF Score:
      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

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

                Dates

                Created:
                Updated:
                Resolved: