summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/process_interface_shardsvr.h
diff options
context:
space:
mode:
authorCharlie Swanson <charlie.swanson@mongodb.com>2018-09-18 13:23:54 -0400
committerCharlie Swanson <charlie.swanson@mongodb.com>2018-11-01 16:59:04 -0400
commit9282c05723eb9f15a6591613007ebe68561c88cb (patch)
treedf797690af51e981ca3845bd124c88fb93d88b69 /src/mongo/db/pipeline/process_interface_shardsvr.h
parentb43765f2caa4c152204f7361c28e091247443c18 (diff)
downloadmongo-9282c05723eb9f15a6591613007ebe68561c88cb.tar.gz
SERVER-36813 Be careful when choosing default uniqueKey
Before doing so, refresh the catalog cache to make sure the mongos serving the request is at least somewhat up to date. Additionally, communicate the epoch used to choose the uniqueKey from mongos to the shards, and raise an error from the shards and terminate the aggregation if the epoch of the targeted collection ever changes.
Diffstat (limited to 'src/mongo/db/pipeline/process_interface_shardsvr.h')
-rw-r--r--src/mongo/db/pipeline/process_interface_shardsvr.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/pipeline/process_interface_shardsvr.h b/src/mongo/db/pipeline/process_interface_shardsvr.h
index 39d550fc083..ddafac24cdb 100644
--- a/src/mongo/db/pipeline/process_interface_shardsvr.h
+++ b/src/mongo/db/pipeline/process_interface_shardsvr.h
@@ -53,7 +53,8 @@ public:
void insert(const boost::intrusive_ptr<ExpressionContext>& expCtx,
const NamespaceString& ns,
std::vector<BSONObj>&& objs,
- const WriteConcernOptions& wc) final;
+ const WriteConcernOptions& wc,
+ boost::optional<OID> targetEpoch) final;
/**
* Replaces the documents matching 'queries' with 'updates' using the ClusterWriter for locking,
@@ -65,7 +66,8 @@ public:
std::vector<BSONObj>&& updates,
const WriteConcernOptions& wc,
bool upsert,
- bool multi) final;
+ bool multi,
+ boost::optional<OID> targetEpoch) final;
};
} // namespace mongo