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
Does a subsequent list operation with a cursor reference keep track of intermediate operations on the original list's references?
For example:
i have 1000 items in a bucket
i list() with a limit of 100 - truncated list w/ cursor returned
Of the returned objects, I delete every 10th key, 10 total deletions
When i next run the list() passing the original cursor, will it pick up at the correct item from the original list, will it shift due to the deletions, or is is non-deterministic?
Intuitively i would expect either a shift or non-deterministic behavior as I've manipulated the list. Testing with Miniflare indicates that it is smart and keeps the correct position in the list. However, I'm not sure if that result of Miniflare is expected behavior in R2 or it's some side-effect of how Miniflare manages the content in memory.
What's interesting, and prompted this question: If i manipulate the underlying results of the list operation, via a put/copy operation, this has a different result: If i copy an item to a location that is later in the order, and after the cursor position, the list operation seems to reset to the beginning - even if i pass the cursor.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Does a subsequent list operation with a cursor reference keep track of intermediate operations on the original list's references?
For example:
list()
with a limit of 100 - truncated list w/ cursor returnedobjects
, I delete every 10th key, 10 total deletionsWhen i next run the
list()
passing the original cursor, will it pick up at the correct item from the original list, will it shift due to the deletions, or is is non-deterministic?Intuitively i would expect either a shift or non-deterministic behavior as I've manipulated the list. Testing with Miniflare indicates that it is smart and keeps the correct position in the list. However, I'm not sure if that result of Miniflare is expected behavior in R2 or it's some side-effect of how Miniflare manages the content in memory.
What's interesting, and prompted this question: If i manipulate the underlying results of the list operation, via a put/copy operation, this has a different result: If i copy an item to a location that is later in the order, and after the cursor position, the list operation seems to reset to the beginning - even if i pass the cursor.
Beta Was this translation helpful? Give feedback.
All reactions