summaryrefslogtreecommitdiff
path: root/src/mongo/db/ops/update.h
diff options
context:
space:
mode:
authorAndrew Morrow <acm@10gen.com>2013-08-06 18:44:11 -0400
committerAndrew Morrow <acm@10gen.com>2013-08-07 15:28:15 -0400
commitd11c7e78d447882b05e993ce60e311e9db959087 (patch)
tree29a9b7ab8a10885c3cf11d5d4f9c9a73eba36d89 /src/mongo/db/ops/update.h
parente323f9cb025348a8a349685595d8933cb3070775 (diff)
downloadmongo-d11c7e78d447882b05e993ce60e311e9db959087.tar.gz
SERVER-10159 Hoist modifier parsing out of the write lock for update
Diffstat (limited to 'src/mongo/db/ops/update.h')
-rw-r--r--src/mongo/db/ops/update.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/mongo/db/ops/update.h b/src/mongo/db/ops/update.h
index 72f4b74a48a..049dcc43cfa 100644
--- a/src/mongo/db/ops/update.h
+++ b/src/mongo/db/ops/update.h
@@ -24,6 +24,8 @@
namespace mongo {
+ class UpdateDriver;
+
// ---------- public -------------
struct UpdateResult {
@@ -64,6 +66,20 @@ namespace mongo {
bool fromMigrate = false,
const QueryPlanSelectionPolicy& planPolicy = QueryPlanSelectionPolicy::any());
+ /** A variant of updateObjects that is only useable if the new update framework is enabled.
+ * It assumes that the UpdateDriver has already been initialized outside the lock.
+ */
+ UpdateResult updateObjects(UpdateDriver* driver,
+ const char* ns,
+ const BSONObj& updateobj,
+ const BSONObj& pattern,
+ bool upsert,
+ bool multi,
+ bool logop,
+ OpDebug& debug,
+ bool fromMigrate = false,
+ const QueryPlanSelectionPolicy& planPolicy = QueryPlanSelectionPolicy::any());
+
/*
* Similar to updateObjects but not strict about applying mods that can fail during initial
* replication.
@@ -109,6 +125,22 @@ namespace mongo {
= QueryPlanSelectionPolicy::any(),
bool forReplication = false);
+ UpdateResult _updateObjectsNEW(UpdateDriver* driver,
+ bool su,
+ const char* ns,
+ const BSONObj& updateobj,
+ const BSONObj& pattern,
+ bool upsert,
+ bool multi,
+ bool logop,
+ OpDebug& debug,
+ RemoveSaver* rs = 0,
+ bool fromMigrate = false,
+ const QueryPlanSelectionPolicy& planPolicy
+ = QueryPlanSelectionPolicy::any(),
+ bool forReplication = false);
+
+
/**
* takes the from document and returns a new document
* after apply all the operators