-
Notifications
You must be signed in to change notification settings - Fork 342
Cosmos Driver: Prime metadata caches at client creation time #3793
Copy link
Copy link
Labels
CosmosThe azure_cosmos crateThe azure_cosmos crate
Description
The Cosmos DB SDK really depends on having full metadata for a container in order to perform operations. Right now, that metadata is lazy-loaded, which means a lot of operations can take a longer amount of time because the cache needs to be populated on the first request. We normally refresh the cache in the background, so it's only this cache priming operation that takes longer.
In order to simplify the clients a bit, and make that behavior clearer to users, let's make DatabaseClient::container_client and CosmosClient::database_client async, and have them perform the cache priming IN the actual creation function.
We're already making these functions async, but this work item track doing the cache priming in those now-async functions.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
CosmosThe azure_cosmos crateThe azure_cosmos crate
Type
Projects
Status
Done