Details
-
Improvement
-
Resolution: Unresolved
-
Major - P3
-
None
-
None
-
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.