summaryrefslogtreecommitdiff
path: root/src/mongo/s
diff options
context:
space:
mode:
authorDavis Haupt <davis.haupt@mongodb.com>2023-05-04 12:57:01 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-05-04 15:10:40 +0000
commit4dd0a134d5ca678bfa6d1973bd4bf28b0ffc6baa (patch)
tree3cbfda395fcec3f4a192934359c008712ee1acca /src/mongo/s
parentb98740e2d27df0fa95632a1ac40adf140512e51c (diff)
downloadmongo-4dd0a134d5ca678bfa6d1973bd4bf28b0ffc6baa.tar.gz
Revert "SERVER-76208 support query shape serialization in IDL for types with custom serializers"
This reverts commit 1470c88daaa805408f083a1c2f7bb22f1632b5d1.
Diffstat (limited to 'src/mongo/s')
-rw-r--r--src/mongo/s/SConscript1
-rw-r--r--src/mongo/s/query/async_results_merger_params.idl19
-rw-r--r--src/mongo/s/query/document_source_merge_cursors.cpp8
-rw-r--r--src/mongo/s/resharding/common_types.idl3
4 files changed, 9 insertions, 22 deletions
diff --git a/src/mongo/s/SConscript b/src/mongo/s/SConscript
index 324602ed191..240410508e5 100644
--- a/src/mongo/s/SConscript
+++ b/src/mongo/s/SConscript
@@ -288,7 +288,6 @@ env.Library(
'$BUILD_DIR/mongo/db/commands/set_user_write_block_mode_idl',
'$BUILD_DIR/mongo/db/common',
'$BUILD_DIR/mongo/db/index_commands_idl',
- '$BUILD_DIR/mongo/db/serialization_options',
'$BUILD_DIR/mongo/rpc/message',
'$BUILD_DIR/mongo/util/caching',
'analyze_shard_key_common',
diff --git a/src/mongo/s/query/async_results_merger_params.idl b/src/mongo/s/query/async_results_merger_params.idl
index 2145840972f..42074b7b62e 100644
--- a/src/mongo/s/query/async_results_merger_params.idl
+++ b/src/mongo/s/query/async_results_merger_params.idl
@@ -51,19 +51,15 @@ types:
structs:
RemoteCursor:
description: A description of a cursor opened on a remote server.
- query_shape_component: true
fields:
shardId:
type: string
description: The shardId of the shard on which the cursor resides.
- query_shape: anonymize
hostAndPort:
type: HostAndPort
description: The exact host (within the shard) on which the cursor resides.
- query_shape: anonymize
cursorResponse:
type: CursorResponse
- query_shape: literal
description: The response after establishing a cursor on the remote shard, including
the first batch.
@@ -71,46 +67,35 @@ structs:
description: The parameters needed to establish an AsyncResultsMerger.
chained_structs:
OperationSessionInfoFromClient : OperationSessionInfo
- query_shape_component: true
fields:
sort:
type: object
description: The sort requested on the merging operation. Empty if there is no sort.
optional: true
- query_shape: literal
compareWholeSortKey:
type: bool
default: false
- query_shape: literal
description: >-
When 'compareWholeSortKey' is true, $sortKey is a scalar value, rather than an
object. We extract the sort key {$sortKey: <value>}. The sort key pattern is
verified to be {$sortKey: 1}.
- remotes:
- type: array<RemoteCursor>
- query_shape: literal
+ remotes: array<RemoteCursor>
tailableMode:
type: TailableMode
optional: true
description: If set, the tailability mode of this cursor.
- query_shape: parameter
batchSize:
type: safeInt64
optional: true
description: The batch size for this cursor.
- query_shape: literal
- nss:
- type: namespacestring
- query_shape: custom
+ nss: namespacestring
allowPartialResults:
type: bool
default: false
description: If set, error responses are ignored.
- query_shape: parameter
recordRemoteOpWaitTime:
type: bool
default: false
- query_shape: parameter
description: >-
This parameter is not used anymore but should stay for a while for backward
compatibility.
diff --git a/src/mongo/s/query/document_source_merge_cursors.cpp b/src/mongo/s/query/document_source_merge_cursors.cpp
index c707596fdc7..1d49bcdf916 100644
--- a/src/mongo/s/query/document_source_merge_cursors.cpp
+++ b/src/mongo/s/query/document_source_merge_cursors.cpp
@@ -117,7 +117,13 @@ DocumentSource::GetNextResult DocumentSourceMergeCursors::doGetNext() {
Value DocumentSourceMergeCursors::serialize(SerializationOptions opts) const {
invariant(!_blockingResultsMerger);
invariant(_armParams);
- return Value(Document{{kStageName, _armParams->toBSON(opts)}});
+ if (opts.applyHmacToIdentifiers || opts.replacementForLiteralArgs) {
+ // TODO: SERVER-76208 support query shapification for IDL types like namespacestring with
+ // custom serializers.
+ MONGO_UNIMPLEMENTED_TASSERT(7484301);
+ }
+
+ return Value(Document{{kStageName, _armParams->toBSON()}});
}
boost::intrusive_ptr<DocumentSource> DocumentSourceMergeCursors::createFromBson(
diff --git a/src/mongo/s/resharding/common_types.idl b/src/mongo/s/resharding/common_types.idl
index c9c8dd7dad3..b28385881d2 100644
--- a/src/mongo/s/resharding/common_types.idl
+++ b/src/mongo/s/resharding/common_types.idl
@@ -271,13 +271,10 @@ structs:
description: "A struct representing the information needed for a resharding pipeline to
determine which documents belong to a particular shard."
strict: true
- query_shape_component: true
fields:
recipientShardId:
type: shard_id
description: "The id of the recipient shard."
- query_shape: anonymize
reshardingKey:
type: KeyPattern
description: "The index specification document to use as the new shard key."
- query_shape: custom