From 5600e8864815719914c48e8ec984a5976fd5cf37 Mon Sep 17 00:00:00 2001 From: Jason Amos Date: Thu, 4 Nov 2021 16:30:06 -0700 Subject: [PATCH 1/2] ParallelQueryExecutionContextBase breaks use of abortSignal in FeedOptions --- .../queryExecutionContext/parallelQueryExecutionContextBase.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/cosmosdb/cosmos/src/queryExecutionContext/parallelQueryExecutionContextBase.ts b/sdk/cosmosdb/cosmos/src/queryExecutionContext/parallelQueryExecutionContextBase.ts index 66515d83ab6e..8eaa89d4158b 100644 --- a/sdk/cosmosdb/cosmos/src/queryExecutionContext/parallelQueryExecutionContextBase.ts +++ b/sdk/cosmosdb/cosmos/src/queryExecutionContext/parallelQueryExecutionContextBase.ts @@ -471,7 +471,7 @@ export abstract class ParallelQueryExecutionContextBase implements ExecutionCont sqlQuerySpec["query"] = rewrittenQuery; } - const options = JSON.parse(JSON.stringify(this.options)); + const options = Object.assign(Object.create(Object.getPrototypeOf(this.options)), this.options); options.continuationToken = continuationToken; return new DocumentProducer( From 3da805e8229a8b37ff63dbc5a400a623a41c464f Mon Sep 17 00:00:00 2001 From: Jason Amos <71847735+jay-most@users.noreply.github.com> Date: Wed, 23 Mar 2022 01:05:04 -0700 Subject: [PATCH 2/2] update object syntax --- .../queryExecutionContext/parallelQueryExecutionContextBase.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/cosmosdb/cosmos/src/queryExecutionContext/parallelQueryExecutionContextBase.ts b/sdk/cosmosdb/cosmos/src/queryExecutionContext/parallelQueryExecutionContextBase.ts index 8144e14d21ba..e3b183bb70f6 100644 --- a/sdk/cosmosdb/cosmos/src/queryExecutionContext/parallelQueryExecutionContextBase.ts +++ b/sdk/cosmosdb/cosmos/src/queryExecutionContext/parallelQueryExecutionContextBase.ts @@ -471,7 +471,7 @@ export abstract class ParallelQueryExecutionContextBase implements ExecutionCont sqlQuerySpec["query"] = rewrittenQuery; } - const options = Object.assign(Object.create(Object.getPrototypeOf(this.options)), this.options); + const options = { ...this.options }; options.continuationToken = continuationToken; return new DocumentProducer(