summaryrefslogtreecommitdiff
path: root/src/mongo/s
diff options
context:
space:
mode:
authorCheahuychou Mao <mao.cheahuychou@gmail.com>2022-11-01 23:48:28 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-11-02 00:43:35 +0000
commitd3ec2b61a2589c9f35f2e11abaee5f163575c99e (patch)
tree33422391ca23365f8bdc72fbd7fc734413f2f29a /src/mongo/s
parent433c0e26e0d4e35bb9b2bf6159ca1556808ab9b9 (diff)
downloadmongo-d3ec2b61a2589c9f35f2e11abaee5f163575c99e.tar.gz
SERVER-70753 Make shards support persisting sampled write queries
Diffstat (limited to 'src/mongo/s')
-rw-r--r--src/mongo/s/analyze_shard_key_common.idl9
-rw-r--r--src/mongo/s/analyze_shard_key_documents.idl21
2 files changed, 30 insertions, 0 deletions
diff --git a/src/mongo/s/analyze_shard_key_common.idl b/src/mongo/s/analyze_shard_key_common.idl
index c89776591e3..af352a8ff1e 100644
--- a/src/mongo/s/analyze_shard_key_common.idl
+++ b/src/mongo/s/analyze_shard_key_common.idl
@@ -49,6 +49,15 @@ enums:
kCount: "count"
kDistinct: "distinct"
+ SampledWriteCommandName:
+ description: "The command name of a sampled write query."
+ type: string
+ values:
+ kInsert: "insert"
+ kUpdate: "update"
+ kDelete: "delete"
+ kFindAndModify: "findAndModify"
+
structs:
QueryAnalyzerConfiguration:
description: "The query analyzer configuration for a collection as configured via the
diff --git a/src/mongo/s/analyze_shard_key_documents.idl b/src/mongo/s/analyze_shard_key_documents.idl
index 190d67d8cde..a3728d6c1cf 100644
--- a/src/mongo/s/analyze_shard_key_documents.idl
+++ b/src/mongo/s/analyze_shard_key_documents.idl
@@ -80,3 +80,24 @@ structs:
cmd:
type: object
description: "The command object for the read."
+
+ SampledWriteQueryDocument:
+ description: "Represents a document storing a sampled write query."
+ strict: false
+ fields:
+ _id:
+ type: uuid
+ description: "The unique sample id for the write."
+ cpp_name: sampleId
+ ns:
+ type: namespacestring
+ description: "The namespace of the collection for the write."
+ collectionUuid:
+ type: uuid
+ description: "The UUID of the collection for the write."
+ cmdName:
+ type: SampledWriteCommandName
+ description: "The command name for the write."
+ cmd:
+ type: object
+ description: "The command object for the write."