diff options
Diffstat (limited to 'src/mongo/db/pipeline/expression_context.h')
-rw-r--r-- | src/mongo/db/pipeline/expression_context.h | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/mongo/db/pipeline/expression_context.h b/src/mongo/db/pipeline/expression_context.h index 5b4b6f55acf..96cce9e4b4f 100644 --- a/src/mongo/db/pipeline/expression_context.h +++ b/src/mongo/db/pipeline/expression_context.h @@ -39,12 +39,8 @@ namespace mongo { struct ExpressionContext : public IntrusiveCounterUnsigned { public: ExpressionContext(OperationContext* opCtx, const NamespaceString& ns) - : inShard(false) - , inRouter(false) - , extSortAllowed(false) - , ns(ns) + : ns(ns) , opCtx(opCtx) - , interruptCounter(interruptCheckPeriod) {} /** Used by a pipeline to check for interrupts so that killOp() works. @@ -54,18 +50,20 @@ namespace mongo { if (opCtx && --interruptCounter == 0) { // XXX SERVER-13931 for opCtx check // The checkForInterrupt could be expensive, at least in relative terms. opCtx->checkForInterrupt(); - interruptCounter = interruptCheckPeriod; + interruptCounter = kInterruptCheckPeriod; } } - bool inShard; - bool inRouter; - bool extSortAllowed; + bool inShard = false; + bool inRouter = false; + bool extSortAllowed = false; + bool bypassDocumentValidation = false; + NamespaceString ns; std::string tempDir; // Defaults to empty to prevent external sorting in mongos. OperationContext* opCtx; - static const int interruptCheckPeriod = 128; - int interruptCounter; // when 0, check interruptStatus + static const int kInterruptCheckPeriod = 128; + int interruptCounter = kInterruptCheckPeriod; // when 0, check interruptStatus }; } |