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

Temporarily disable `TaskWaitingForOngoingQueriesInvalidatedOnStepDown` unit test

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Sharding EMEA 2022-08-08
    • 153

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

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

              Created:
              Updated:
              Resolved: