This repository was archived by the owner on Jul 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
Is there any reason why the IndexingMode is set to Consistent? #53
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
I am referring to:
Orleans.CosmosDB/src/Orleans.Persistence.CosmosDB/CosmosDBGrainStorage.cs
Lines 416 to 419 in 948ef97
| var stateCollection = new ContainerProperties(this._options.Collection, DEFAULT_PARTITION_KEY_PATH); | |
| stateCollection.IndexingPolicy.IndexingMode = IndexingMode.Consistent; | |
| stateCollection.IndexingPolicy.IncludedPaths.Add(new IncludedPath { Path = "/*" }); | |
| stateCollection.IndexingPolicy.ExcludedPaths.Add(new ExcludedPath { Path = "/\"State\"/*" }); |
From my understanding of the code, the Orleans.Persistence.CosmosDB Storage Provider always does point reads (only using ID and Partition Key); so it uses CosmosDB as a KV Store and never queries using the indexed values.
We are trying to optimize our CosmosDB usage and it looks like for indexing CosmosDB charges you extra RU/s. I was wondering if we could just go ahead and turn off indexing and this library would still work correctly.
As far as I can see it would, but I'm wondering if there is any reason that I'm missing
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request