What uniquely defines the RequestContinuation token in CosmosDb

筅森魡賤 提交于 2019-12-14 03:57:56

问题


I am going through paging the results returning from CosmosDb and for that I need to understand what uniquely defines the FeedOptions.RequestContinuation string. I can make the paging work, so that is not the issue, but its uniqueness is needed for our purposes. What astonished me, for instance, is that the RequestContinuation token is not the same if I perform the following:

-Create data in the emulator for two pocos

-Query items with MaxItemCount

-Get the first RequestContinuation token and store it

-Delete all data (manually in the emulator explorer) and recreating them. The data are exactly the same except for the auto-generated values such as the Id

-Same query with the same MaxItemCount

-Get the token again and store it

The result is that the token last retrieved is not the same as the one in the first method.

Is it possible to have a detailed breakdown on what uniquely defines a RequestContinuation token? Thanks


回答1:


The continuation token should be treated as an opaque string. The actual value depends on the query execution plan, system generated IDs, configurations like page size, degree of parallelism, API version, and more factors. You won't get the same continuation token twice for the same query however.



来源:https://stackoverflow.com/questions/48545528/what-uniquely-defines-the-requestcontinuation-token-in-cosmosdb

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!