diff options
author | Charlie Swanson <charlie.swanson@mongodb.com> | 2018-09-18 13:23:54 -0400 |
---|---|---|
committer | Charlie Swanson <charlie.swanson@mongodb.com> | 2018-11-01 16:59:04 -0400 |
commit | 9282c05723eb9f15a6591613007ebe68561c88cb (patch) | |
tree | df797690af51e981ca3845bd124c88fb93d88b69 /src/mongo/db/pipeline/process_interface_shardsvr.h | |
parent | b43765f2caa4c152204f7361c28e091247443c18 (diff) | |
download | mongo-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.h | 6 |
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 |