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

Temporarily disable `TaskWaitingForOngoingQueriesInvalidatedOnStepDown` unit test

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 6.1.0-rc0
    • None
    • None
    • None
    • Fully Compatible
    • ALL
    • Sharding EMEA 2022-08-08
    • 153

    Description

      This unit test is intermittently failing because it wrongly assumes that this wait on a future to fail once the executor gets shut down.

      This synthetic test consistently reproduces the issue:

      TEST_F(ShardServerTestFixture, ShutdownExecutorDoesNotKillWaitOnFuture){
          const std::string kExecName("CoolExecName");
          auto net = executor::makeNetworkInterface(kExecName);
          auto pool = std::make_unique<executor::NetworkInterfaceThreadPool>(net.get());
          auto taskExecutor =
              std::make_shared<executor::ThreadPoolTaskExecutor>(std::move(pool), std::move(net));
          taskExecutor->startup();
       
          SharedPromise<void> promise;
       
          auto chainCompletion = ExecutorFuture<void>(taskExecutor)
          .then([futureToWaitOn = promise.getFuture()](){
              return futureToWaitOn; // Wait for the future to be marked as ready
          }).share();
          
          // Sleep a bit before shutting down the executor to make sure the chain arrives to `return futureToWaitOn;`
          sleep(2);
       
          taskExecutor->shutdown();
       
          // The following line hangs forever (as long as `futureToWaitOn` is not ready) because the wait is not killed on executor shutdown
          chainCompletion.getNoThrow().ignore();
      }
      

      Attachments

        Activity

          People

            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: