summaryrefslogtreecommitdiff
path: root/src/mongo/s/commands/cluster_write_cmd.h
diff options
context:
space:
mode:
authorJason Zhang <jason.zhang@mongodb.com>2023-05-17 02:23:47 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-05-17 03:15:10 +0000
commit06797deec0c5806e56a70a7d156556e0b028da7f (patch)
tree07788fd471fdf4584b7b4b944c867d78932b88ec /src/mongo/s/commands/cluster_write_cmd.h
parentb4b4b310cd5fe22d33a749eca4e43c42c2adf76c (diff)
downloadmongo-06797deec0c5806e56a70a7d156556e0b028da7f.tar.gz
SERVER-69922 Implement explain for updateOne, deleteOne, and findAndModify
Diffstat (limited to 'src/mongo/s/commands/cluster_write_cmd.h')
-rw-r--r--src/mongo/s/commands/cluster_write_cmd.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/s/commands/cluster_write_cmd.h b/src/mongo/s/commands/cluster_write_cmd.h
index f29f4182808..fa8a70d51c6 100644
--- a/src/mongo/s/commands/cluster_write_cmd.h
+++ b/src/mongo/s/commands/cluster_write_cmd.h
@@ -155,6 +155,15 @@ private:
return static_cast<const ClusterWriteCmd*>(definition());
}
+ /**
+ * Runs a two-phase protocol to explain an updateOne/deleteOne without a shard key or _id.
+ * Returns true if we successfully ran the protocol, false otherwise.
+ */
+ bool _runExplainWithoutShardKey(OperationContext* opCtx,
+ const NamespaceString& nss,
+ ExplainOptions::Verbosity verbosity,
+ BSONObjBuilder* result);
+
const OpMsgRequest* _request;
BatchedCommandRequest _batchedRequest;