diff options
author | Mathias Stearn <mathias@10gen.com> | 2015-05-11 17:36:52 -0400 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2015-05-14 18:59:03 -0400 |
commit | 463d3343d559590d60cfd5c48ac98ad675d5390e (patch) | |
tree | 5ab045f64656074016c08229ae0bcc6734579e6e /src/mongo/db/pipeline/expression_context.h | |
parent | 22de12dd4ac510cd2a37b643eb528673f651e21b (diff) | |
download | mongo-463d3343d559590d60cfd5c48ac98ad675d5390e.tar.gz |
SERVER-18227 Add bypassDocumentValidation option to commands that need it
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 }; } |