Confusion about CosmosDB binding and retries
See original GitHub issueI am currently trying to use the retry policy in the CosmosDB binding in the Function. However, I think that the docs are bit misleading as of now and I am unsure whether the retry policy will work or not.
Repro steps
Provide the steps required to reproduce the problem
- I have a python Function that uses the CosmosDB binding. I wanted also to add retry policy as stated here: https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-error-pages?tabs=fixed-delay%2Cin-process&pivots=programming-language-python#retries The definition of the function.json looks like this:
{
"scriptFile": "../src/handler.py",
"entryPoint": "handle",
"bindings": [
{
"type": "cosmosDBTrigger",
"name": "documents",
"direction": "in",
"connectionStringSetting": "CosmosDB_Endpoint",
"databaseName": "database",
"collectionName": "collection",
"CreateLeaseCollectionIfNotExists": true
}],
"retry": {
"strategy": "exponentialBackoff",
"maxRetryCount": 3,
"minimumInterval": "00:01:00",
"maximumInterval": "00:15:00"
}
}
- When the host is initializing is is showing the following log:
Expected behavior
Based on the information found on the https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-error-pages?tabs=fixed-delay%2Cin-process&pivots=programming-language-python#retries it seems that the retry policy is supported for the CosmosDB binding. I was expecting that this kind of log won’t be shown.
Actual behavior
The log regarding the support of the retry policy is showing which is somewhat confusing in relation to the documents.
Related information
Provide any related information
- Version of the azure functions python runner = 4.15.1.1
- Host.json
{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": false,
"excludedTypes": "Request"
}
}
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[2.*, 3.0.0)"
}
}
Issue Analytics
- State:
- Created 7 months ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Automatic retry to CosmosDb output binding - azure
I'm using an Azure function that sends an array of around 200 documents to a CosmosDB via the Output Binding. That function gets...
Read more >A technical overview of Azure Cosmos DB | Azure Blog
With an upper bound of request processing on every database transaction, Azure Cosmos DB allows clients to clearly distinguish between ...
Read more >Automatic retry to CosmosDb output binding
The Output binding uses SDK 1.13.2 which already has the retry mechanism in place. Assuming you are using Azure Functions v1, if you...
Read more >A quick review of the Azure Functions new feature "Retry ...
Retry Policy allows you to implement retries in your application by simply adding simple annotations. This is a long-awaited feature for those ...
Read more >The Curious Case of Cosmos DB - Kunal Sale - Medium
Using this mechanism, Cosmos DB ensures that the data operations are cheap and less expensive. Don't confuse the partitioning with the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Okay, I posted a issue on the azure-docs github repository so that the documentation is clearer about this (https://github.com/MicrosoftDocs/azure-docs/issues/106040). Closing this ticket
@Ceglowa The documentation page has a Feedback section at the bottom, please use that to report documentation related issues. I understand what you are describing, but there is nothing that can be changed on this repo to either update the documentation or to handle Bundle related questions.