You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
At the moment we are using the limit and skip functions on MongoDB to handle pagination on the POST /bbs/accounts and POST /tps/accounts APIs. As mentioned here: https://www.mongodb.com/docs/manual/reference/method/cursor.skip/#using-range-queries, this is inefficient and not guaranteed to be consistent if the underlying data changes. This may result in duplicated or missing data across pages.
To Reproduce
Steps to reproduce the behavior:
Begin paging through results
Add or remove document from collection
Continue paging to see duplicates/missing data
Expected behavior
We should use the "range query" method described here: https://www.mongodb.com/docs/manual/reference/method/cursor.skip/#using-range-queries instead of the skip function to handle pagination. For this API, we do not care what field is used for ordering, so feel free to sort by the _id field which is guaranteed to be unique and indexed. We should deprecate but still support skip for backwards compatibility.
The text was updated successfully, but these errors were encountered:
Describe the bug
At the moment we are using the
limit
andskip
functions on MongoDB to handle pagination on thePOST /bbs/accounts
andPOST /tps/accounts
APIs. As mentioned here: https://www.mongodb.com/docs/manual/reference/method/cursor.skip/#using-range-queries, this is inefficient and not guaranteed to be consistent if the underlying data changes. This may result in duplicated or missing data across pages.To Reproduce
Steps to reproduce the behavior:
Expected behavior
We should use the "range query" method described here: https://www.mongodb.com/docs/manual/reference/method/cursor.skip/#using-range-queries instead of the
skip
function to handle pagination. For this API, we do not care what field is used for ordering, so feel free to sort by the_id
field which is guaranteed to be unique and indexed. We should deprecate but still supportskip
for backwards compatibility.The text was updated successfully, but these errors were encountered: