diff options
author | Romans Kasperovics <romans.kasperovics@mongodb.com> | 2022-05-04 13:15:45 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-05-04 14:28:45 +0000 |
commit | dee78d953c905a26e84741a5d40f8a463c594759 (patch) | |
tree | 8a16e9f96b95f6b929d7ea644cc7da5d92a3e971 /src/mongo/db/operation_context.h | |
parent | 32ea347de86eb649b5b1d196bbc4cb5411d1d26b (diff) | |
download | mongo-dee78d953c905a26e84741a5d40f8a463c594759.tar.gz |
SERVER-65460 Set allowDiskUse to false in read-only mode
Diffstat (limited to 'src/mongo/db/operation_context.h')
-rw-r--r-- | src/mongo/db/operation_context.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/operation_context.h b/src/mongo/db/operation_context.h index ec3d01f4133..e4b522139d4 100644 --- a/src/mongo/db/operation_context.h +++ b/src/mongo/db/operation_context.h @@ -596,7 +596,7 @@ public: * - User originating operations are not allowed to perform writes. */ bool readOnly() const { - if (!getClient()->isFromUserConnection()) + if (!(getClient() && getClient()->isFromUserConnection())) return false; return !getServiceContext()->userWritesAllowed(); } |