Get All Documents CosmosDB task appears to cache first hit
See original GitHub issueCreated a Logic App w/ the following definition:
{
"$connections": {
"value": {
"documentdb": {
"connectionId": ".../providers/Microsoft.Web/connections/documentdb",
"connectionName": "documentdb",
"id": ".../providers/Microsoft.Web/locations/westus/managedApis/documentdb"
}
}
},
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"For_each": {
"actions": {
"Compose": {
"inputs": "@items('For_each')",
"runAfter": {},
"type": "Compose"
}
},
"foreach": "@body('Get_all_documents')?['Documents']",
"runAfter": {
"Get_all_documents": [
"Succeeded"
]
},
"type": "Foreach"
},
"Get_all_documents": {
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['documentdb']['connectionId']"
}
},
"method": "get",
"path": "/dbs/@{encodeURIComponent('serverless')}/colls/@{encodeURIComponent('transactions')}/docs"
},
"runAfter": {},
"type": "ApiConnection"
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {
"$connections": {
"defaultValue": {},
"type": "Object"
}
},
"triggers": {
"manual": {
"inputs": {
"schema": {}
},
"kind": "Http",
"type": "Request"
}
}
}
}
The first time I ran it, I had one document in the target collection. Then I added 2 more documents and ran the app again. It returned only one doc; the same as the first run. Things I’ve tried:
- Deleting the
documentdb
API connection that was created, recreating it, running the app again - Creating a new Logic App w/ the same steps
- Using the
guid()
string expression to generate a guid and put it in the Session Token - Using the
guid()
string expression to generate a guid and put it in the Activity ID
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
ReadNextAsync goes crazy and load all documents from ...
Hi everyone. I have nasty case for you, which we observe on our production code. It's random, it's crazy and we are out...
Read more >Performance tips for Azure Cosmos DB and .NET SDK v2
Lookups based on resource IDs are faster than name-based lookups, so caching these values improves performance.
Read more >Slow performance on Azure DocumentDB
Tip #2: Cache document and collection SelfLinks for lower read latency ... a selfLink is the most efficient way to get a single...
Read more >How to Use Caching with Azure Cosmos DB - Webinar
So, first use case is app data caching. In Microsoft Azure Cosmos DB, you have Cosmos DB as your primary source. That's where...
Read more >Aggressively tuning Cosmos DB (the long way round)
We update this document whenever we change a rating, and query it to work out which rating to use. This might seem counter-intuitive....
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
@brandonh-msft, the Issues section here is for questions about the artifacts in this GitHub repository. Please email the bapiconsup alias internal to Microsoft for questions about connectors like the Cosmos DB connector.
Yes logic apps team doesn’t work much in GitHub like the functions team does. Best places would be emailing the logicappstalk alias internal to microsoft. External likely emailing logicappsemail at microsoft dot com