question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Get All Documents CosmosDB task appears to cache first hit

See original GitHub issue

Created 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:closed
  • Created 6 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
joechung-msftcommented, Aug 22, 2018

@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.

1reaction
jeffhollancommented, Jun 13, 2018

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found