moving the throughput bucket flag to the client generation level

This commit is contained in:
Sung-Hyun Kang 2025-02-11 15:03:23 -06:00
parent f01d4a5ae2
commit 5997fabcda
3 changed files with 2 additions and 10 deletions

View File

@ -203,8 +203,10 @@ export function client(): Cosmos.CosmosClient {
}
let _defaultHeaders: Cosmos.CosmosHeaders = {};
_defaultHeaders["x-ms-cosmos-sdk-supportedcapabilities"] =
SDKSupportedCapabilities.None | SDKSupportedCapabilities.PartitionMerge;
_defaultHeaders["x-ms-cosmos-throughput-bucket"] = 1;
if (
userContext.authType === AuthType.ConnectionString ||

View File

@ -5,9 +5,6 @@ exports[`getCommonQueryOptions builds the correct default options objects 1`] =
"disableNonStreamingOrderByQuery": true,
"enableScanInQuery": true,
"forceQueryPlan": true,
"initialHeaders": {
"x-ms-cosmos-throughput-bucket": "1",
},
"maxDegreeOfParallelism": 0,
"maxItemCount": 100,
"populateQueryMetrics": true,
@ -19,9 +16,6 @@ exports[`getCommonQueryOptions reads from localStorage 1`] = `
"disableNonStreamingOrderByQuery": true,
"enableScanInQuery": true,
"forceQueryPlan": true,
"initialHeaders": {
"x-ms-cosmos-throughput-bucket": "1",
},
"maxDegreeOfParallelism": 17,
"maxItemCount": 37,
"populateQueryMetrics": true,

View File

@ -28,9 +28,5 @@ export const getCommonQueryOptions = (options: FeedOptions): FeedOptions => {
Queries.itemsPerPage;
options.maxDegreeOfParallelism = LocalStorageUtility.getEntryNumber(StorageKey.MaxDegreeOfParellism);
options.disableNonStreamingOrderByQuery = !isVectorSearchEnabled();
options.initialHeaders = {
...options.initialHeaders,
"x-ms-cosmos-throughput-bucket": "1",
};
return options;
};