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

Periodically check for cancelation while loading state documents

    • Service Arch

      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.

            Assignee:
            backlog-server-servicearch [DO NOT USE] Backlog - Service Architecture
            Reporter:
            amirsaman.memaripour@mongodb.com Amirsaman Memaripour
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: