diff options
author | Hana Pearlman <hana.pearlman@mongodb.com> | 2021-08-20 14:04:06 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-08-20 14:48:52 +0000 |
commit | c3af4467a404fffebd8b8584fc8c24160d02e850 (patch) | |
tree | 2bda49bda5870ecf8e70d6d35e1554343442aa4c /src/mongo/db/commands/getmore_cmd.cpp | |
parent | 2d5f7632b30fa6b57992cd6db314ab2a5ca076a6 (diff) | |
download | mongo-c3af4467a404fffebd8b8584fc8c24160d02e850.tar.gz |
SERVER-58586: Improve ClientCursor on mongoD to store and restore theā¦
Diffstat (limited to 'src/mongo/db/commands/getmore_cmd.cpp')
-rw-r--r-- | src/mongo/db/commands/getmore_cmd.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mongo/db/commands/getmore_cmd.cpp b/src/mongo/db/commands/getmore_cmd.cpp index 901f62ef6d7..9268249469a 100644 --- a/src/mongo/db/commands/getmore_cmd.cpp +++ b/src/mongo/db/commands/getmore_cmd.cpp @@ -37,6 +37,7 @@ #include <string> #include "mongo/bson/util/bson_extract.h" +#include "mongo/client/read_preference.h" #include "mongo/db/api_parameters.h" #include "mongo/db/auth/authorization_checks.h" #include "mongo/db/auth/authorization_session.h" @@ -225,6 +226,7 @@ void setUpOperationContextStateForGetMore(OperationContext* opCtx, bool disableAwaitDataFailpointActive) { applyCursorReadConcern(opCtx, cursor.getReadConcernArgs()); opCtx->setWriteConcern(cursor.getWriteConcernOptions()); + ReadPreferenceSetting::get(opCtx) = cursor.getReadPreferenceSetting(); auto apiParamsFromClient = APIParameters::get(opCtx); uassert( |