Forum Widgets
Latest Discussions
Replace Operation Cosmos Db
Hi Team, We have noticed that during millisecond interval sequential operations (create, read, replace operations happening in very small interval) for some records even though we don't get an error we see the cosmos database didn't do a successful replace or update on the item. Is there a limitation in the replace operation with high volume requests with respect to atomicity? With Regards, Nitin RahimnitinrahimJan 02, 2024Brass Contributor2.7KViews0likes11CommentsControlling an Application’s Throughput Consumption in Cosmos DB with ThroughputControlGroup
Hi Azure Cosmos Db Team, Was referring to the below document link to limit the throughput consumption per requests. https://the9090rule.medium.com/controlling-an-applications-throughput-consumption-in-cosmos-db-with-throughputcontrolgroup-247cc0eafa92 How will the application behave in case the operations in the group exceed the set throughput? Will it get throttled? With Regards, Nitin RahimnitinrahimDec 11, 2023Brass Contributor1.2KViews2likes9CommentsAzure Synapse Link for Cosmos Db
Hi Azure Cosmos Db Team, When accessing Cosmos Db with private endpoint from serverless sql pools in synapse workspace, I was getting the below error. Resolving CosmosDB path has failed with error 'Access to the database account '*******' is forbidden.'. I followed the below steps. Create new CosmosDb with Azure Synapse Link enabled Enable private endpoint for the Cosmos Db with required vnet configuration and test it by trying to access the items in the container. Create a new Synapse Workspace, choosing Managed VNet After creation, verify that the Integration Runtime is in the Managed VNet. Create two new private endpoints for Cosmos db from synapse. One for type Sql, and one for Analytical. Approve both end points from Cosmos Db networking tab. From synapse workspace access the container with the synapse link enabled After running a query in serverless sql pools , I get the access forbidden Issue. Resolving CosmosDB path has failed with error 'Access to the database account '*******' is forbidden.'. I followed the below steps. Can you please advise? I was following the below steps. https://learn.microsoft.com/en-us/azure/cosmos-db/analytical-store-private-endpoints. Is there analytical target sub-resource private endpoint also need to be created for Cosmos Db other than sql? With Regards, Nitin RahimnitinrahimSep 28, 2023Brass Contributor2KViews0likes9CommentsCosmos Db JAVA SDK Retry Policy
Hi Azure Cosmos Db Team, We haven't explicitly set retry policy in the event of throttling. Uses the default throttling retry policy. Below as seen from diagnostics. throttlingRetryOptions=RetryOptions{maxRetryAttemptsOnThrottledRequests=9, maxRetryWaitTime=PT30S} However when we encountered actual throttling ("statusCode\":429,\"subStatusCode\":3200) we see in the diagnostics values increasing in multiples of 4 \"retryAfterInMs\":4.0 x-ms-retry-after-ms=4, \"retryAfterInMs\":8.0 x-ms-retry-after-ms=8 and resulting in Request rate is large. More Request Units may be needed, so no changes were made. Please retry this request later. Can you please let me know the difference in behavior here(maxRetryWaitTime as shown in throttlingRetryOptions and retryAfterInMs in the diagnostics as seen above in the event pf throttling) ? I was expecting in the event of throttling the request will be retried after 30 seconds only based on throttlingRetryOptions setting? This is having a compounding effect in case of concurrent requests which affects overall throughput. We need to customize based on our requirement the retry no of times and interval in the event of throttling. Which parameter should we use for that? With Regards, Nitin RahimnitinrahimMay 29, 2024Brass Contributor860Views0likes6CommentsAzure Cosmos Db Materialized View general availability
Hi Azure Cosmos DB Team, Can you please confirm if materialized view for Cosmos Db is general available now and can be recommended for production workloads? Also lag for materialized view to catchup is dependent on SKU allocation and provisioned RU in source and destination container only? Does consistency have any impact when querying the materialized view query or for the materialized view catcup in case of heavy writes and updates in source container? If the account is set up with bounded staleness consistency materialized view querying will also have bounded staleness consistency associated with them when using cosmos JAVA sdk for querying? We are using SQL API. With Regards, Nitin RahimnitinrahimApr 19, 2024Brass Contributor548Views0likes5CommentsPagination in Cosmos Db (Maxitemcount or pagesize)
Hi Azure Cosmos Db Team, Is there an equivalent in Cosmos Db for MaxItemCount parameter( present in dotnet sdk) in JAVA SDK? We wanted to test with MaxItemCount to -1 in JAVA SDK? Where is this exposed? In feed options or Cosmos queryrequestoptions? I see a pagesize parameter in JAVA SDK but we cannot set the same to -1 it seems so that the SDK can optimize the same? We are using SQL API. We are currently using pagesize ==100 for cross partition queries.We are seeing high latency for queries exceeding 2000 results from SDK even though from the portal the RU and latency seems to be less. https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.documents.client.feedoptions.maxitemcount?view=azure-dotnet With Regards, Nitin RahimnitinrahimMar 19, 2024Brass Contributor893Views0likes5CommentsConnection Pooling
Hi Azure Cosmos Db Team, Is there any best practices to identify if there is connection pooling happening with Cosmos Db JAVA SDK? I see for pointread call the average duration in ms is well around 10 ms from comsos db diagnostic logs but in app insights for the Microsoft.DocumentDb call duration for the cosmos db interaction ( for doing pointread) varies considerably and sometimes reaches around 600 ms especially as number of threads( 5-600 threads step by step in our case) are increased in load testing ? I am suspecting this is happening as the sdk is trying to open a new connection as threads increases and this results in increased latency for "some" requests? I see that for the first call there is a login.microsoftonline.com call happening before doing the actual read in cosmos db but cannot see this call in all the ones with higher latency from app insights probably due to sampling in app insights? We are using direct connection mode in sdk. The direct connection configuration parameters currently used are based on the below documentation. https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/tune-connection-configurations-java-sdk-v4?tabs=api-async With Regards, Nitin RahimnitinrahimSep 13, 2023Brass Contributor840Views0likes5CommentsNOT IS_DEFINED in Comsos Db
Hi Azure Cosmos Db team, We need to use NOT IS_DEFINED to evaluate a property below NOT IS_DEFINED(c.TestLocation['South Central US'] per the results analyzed NOT IS_DEFINED is not utilizing Index and is doing a full scan. There was an update from Cosmos Db Team that NOT IS_DEFINED can utilize index now. Below is the blog pertaining the same. https://devblogs.microsoft.com/cosmosdb/april-query-improvements/ Can you please provide an alternative available if we cannot use NOT IS_DEFINED to evaluate the same property and to utilize index without a data model update? With Regards, Nitin RahimnitinrahimMay 07, 2024Brass Contributor653Views0likes3CommentsQuery to see if a container exists in Cosmos Db
Hi Team, Is there a cosmos query that can be executed in cosmos database to see if a particular container exists in a cosmos database from the portal or at the sdk level? We are using JAVA SDK. With Regards, Nitin RahimnitinrahimOct 20, 2023Brass Contributor6.5KViews0likes3CommentsLength of partition key and Id in Cosmos Db
Hi Team, Is there any limitation in the length or number of characters for partition key and Id in Cosmos Db? We are using SQL API. We saw id field allows only 1024 characters while testing. With Regards, Nitin RahimnitinrahimOct 05, 2023Brass Contributor1.4KViews0likes3Comments