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

Periodically check for cancelation while loading state documents

    XMLWordPrintableJSON

Details

    • Service Arch

    Description

      PrimaryOnlyService should periodically check for cancelation while loading state documents (see here and here). The following is an example of a loop used to load state documents:

      ...
      FindCommandRequest findRequest{ns};
      auto cursor = client.find(std::move(findRequest));
      while (cursor->more()) {
          stateDocuments.push_back(cursor->nextSafe().getOwned());
      }
      ...
      

      The current implementation keeps following the cursor regardless of service cancelation. Periodically checking for cancelation and interrupting the above loop would make services response faster to cancelation.

      Attachments

        Activity

          People

            backlog-server-servicearch Backlog - Service Architecture
            amirsaman.memaripour@mongodb.com Amirsaman Memaripour
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: