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.

[FEATURE REQ]Support pause and resume while query entities

See original GitHub issue

Library or service name. What library or service is this request related to? [e.g. Azure.Storage.Blobs] Azure.Data.Tables

Is your feature request related to a problem? Please describe. What feature would you like to get added? What problem is it solving? while query entities using QueryEntityAsync, the ContinuationToken is not exposed and cannot be passed in. So there is no way to pause/resume the query. For example, If we have a webpage, which by default shows the first 1000 records(by calling QueryEntityAsync the first time). And when and only when user clicks a Next Page button, we call QueryEntityAsync again and return only the next 1000 records from table storage. But for now, the QueryEntityAsync doesn’t support it. It always iterate all records. Please correct me if I’m wrong.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
juniwangcommented, Sep 16, 2021

No the automatic fetching next page is not expected. In our case the next call could happen in different context even in different process/VM. We need to serialize and pass the continuationToken from one worker to another.

0reactions
christothescommented, Sep 16, 2021

You shouldn’t need to deal with the continuation token at all.

Each iteration through the result of AsPages is automatically fetching the next page of results for you using the continuation token behind the scenes. It does not fetch a page until the enumeration is iterated over. The page size is controlled by the maxItemsPerPage parameter sent to the Query method.

So, if you only wanted to fetch the first 10 items of a query that would return 1000’s of items, you could specify a maxItemsPerPage value of 10 and exit the foreach loop after just one iteration.

Note that no matter what value is used for maxItemsPerPage, if you iterate through the loop until completion, you’ll get the full result set, no matter how many there are.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to pause and resume dedicated SQL pools with ...
Learn to automate pause and resume for a dedicated SQL pool with Synapse Pipelines in Azure Synapse Analytics.
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