Allow pre-provisioned throughput (#68)
* Allowing to use provisioned throughput by setting offerThroughput value to "0". * Round-about way of re-writing this onto current main, but I wanted to keep the original PR commit in the list for credit. --------- Co-authored-by: Al Baymar <abaymar@aras.com>
This commit is contained in:
Родитель
37f4c1338a
Коммит
99e0015a7e
|
@ -22,7 +22,7 @@ Then, register your new provider like so:
|
|||
|
||||
2. *cosmosDBAuthKeySettingKey* - The appsetting key name which points to a CosmosDB auth key
|
||||
|
||||
3. *offerThroughput* - The offer throughput provisioned for a collection in measurement of Requests-per-Unit in the Azure DocumentDB database service. If the collection provided doesn't exist, the provider will create a collection with this offerThroughput.
|
||||
3. *offerThroughput* - The offer throughput provisioned for a collection in measurement of Requests-per-Unit in the Azure DocumentDB database service. If the collection provided doesn't exist, the provider will create a collection with this offerThroughput. If set to "0", collection will be set to use the default throughput of the database.
|
||||
|
||||
4. *connectionMode* - Direct | Gateway
|
||||
|
||||
|
|
|
@ -887,7 +887,7 @@ namespace Microsoft.AspNet.SessionState
|
|||
IndexingPolicy = s_indexNone
|
||||
};
|
||||
|
||||
ContainerResponse response = await database.CreateContainerIfNotExistsAsync(containerProperties, s_offerThroughput).ConfigureAwait(false);
|
||||
ContainerResponse response = await database.CreateContainerIfNotExistsAsync(containerProperties, s_offerThroughput > 0 ? s_offerThroughput : (int?)null).ConfigureAwait(false);
|
||||
|
||||
if (response?.Resource?.PartitionKeyPath != partitionKeyPath)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче