mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-05-03 23:13:55 +01:00
moving the throughput bucket flag to the client generation level
This commit is contained in:
parent
f01d4a5ae2
commit
5997fabcda
@ -203,8 +203,10 @@ export function client(): Cosmos.CosmosClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let _defaultHeaders: Cosmos.CosmosHeaders = {};
|
let _defaultHeaders: Cosmos.CosmosHeaders = {};
|
||||||
|
|
||||||
_defaultHeaders["x-ms-cosmos-sdk-supportedcapabilities"] =
|
_defaultHeaders["x-ms-cosmos-sdk-supportedcapabilities"] =
|
||||||
SDKSupportedCapabilities.None | SDKSupportedCapabilities.PartitionMerge;
|
SDKSupportedCapabilities.None | SDKSupportedCapabilities.PartitionMerge;
|
||||||
|
_defaultHeaders["x-ms-cosmos-throughput-bucket"] = 1;
|
||||||
|
|
||||||
if (
|
if (
|
||||||
userContext.authType === AuthType.ConnectionString ||
|
userContext.authType === AuthType.ConnectionString ||
|
||||||
|
@ -5,9 +5,6 @@ exports[`getCommonQueryOptions builds the correct default options objects 1`] =
|
|||||||
"disableNonStreamingOrderByQuery": true,
|
"disableNonStreamingOrderByQuery": true,
|
||||||
"enableScanInQuery": true,
|
"enableScanInQuery": true,
|
||||||
"forceQueryPlan": true,
|
"forceQueryPlan": true,
|
||||||
"initialHeaders": {
|
|
||||||
"x-ms-cosmos-throughput-bucket": "1",
|
|
||||||
},
|
|
||||||
"maxDegreeOfParallelism": 0,
|
"maxDegreeOfParallelism": 0,
|
||||||
"maxItemCount": 100,
|
"maxItemCount": 100,
|
||||||
"populateQueryMetrics": true,
|
"populateQueryMetrics": true,
|
||||||
@ -19,9 +16,6 @@ exports[`getCommonQueryOptions reads from localStorage 1`] = `
|
|||||||
"disableNonStreamingOrderByQuery": true,
|
"disableNonStreamingOrderByQuery": true,
|
||||||
"enableScanInQuery": true,
|
"enableScanInQuery": true,
|
||||||
"forceQueryPlan": true,
|
"forceQueryPlan": true,
|
||||||
"initialHeaders": {
|
|
||||||
"x-ms-cosmos-throughput-bucket": "1",
|
|
||||||
},
|
|
||||||
"maxDegreeOfParallelism": 17,
|
"maxDegreeOfParallelism": 17,
|
||||||
"maxItemCount": 37,
|
"maxItemCount": 37,
|
||||||
"populateQueryMetrics": true,
|
"populateQueryMetrics": true,
|
||||||
|
@ -28,9 +28,5 @@ export const getCommonQueryOptions = (options: FeedOptions): FeedOptions => {
|
|||||||
Queries.itemsPerPage;
|
Queries.itemsPerPage;
|
||||||
options.maxDegreeOfParallelism = LocalStorageUtility.getEntryNumber(StorageKey.MaxDegreeOfParellism);
|
options.maxDegreeOfParallelism = LocalStorageUtility.getEntryNumber(StorageKey.MaxDegreeOfParellism);
|
||||||
options.disableNonStreamingOrderByQuery = !isVectorSearchEnabled();
|
options.disableNonStreamingOrderByQuery = !isVectorSearchEnabled();
|
||||||
options.initialHeaders = {
|
|
||||||
...options.initialHeaders,
|
|
||||||
"x-ms-cosmos-throughput-bucket": "1",
|
|
||||||
};
|
|
||||||
return options;
|
return options;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user