Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUERY]What happens when continuation tokens become invalid? #48166

Closed
JohanKlijn opened this issue Feb 7, 2025 · 3 comments
Closed

[QUERY]What happens when continuation tokens become invalid? #48166

JohanKlijn opened this issue Feb 7, 2025 · 3 comments
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)

Comments

@JohanKlijn
Copy link

Library name and version

Azure.Storage.Blobs 12.19.1

Query/Question

There was a question "Do continuation tokens expire?" The answer was: "continuation tokens do not expire at a specific time, but may become invalid over time as blobs are added or removed from the container in question."

Question is, what means invalid? For example what happens when blobs are added/removed?

  • Will it throw an exception?
  • Will it ignore blobs which are added?
  • Blobs are ordered lexicographically by name when calling GetBlobsAsync. So let's say I have the blobs A B C E F G (so no D yet) and in the last call to GetBlobsAsync I retrieved E. What will happen when a blob D is added? Will I just get F with the next call to GetBlobsAsync or ....?

Environment

No response

@github-actions github-actions bot added Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files) labels Feb 7, 2025
Copy link

github-actions bot commented Feb 7, 2025

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.

@amnguye
Copy link
Member

amnguye commented Feb 13, 2025

Will it throw an exception?

If you hand an invalid / expired continuation token, the service will send back an error, and the SDK will throw a RequestFailedException

Will it ignore blobs which are added?

It is not guaranteed that blobs added to the container, will be listed

Blobs are ordered lexicographically by name when calling GetBlobsAsync. So let's say I have the blobs A B C E F G (so no D yet) and in the last call to GetBlobsAsync I retrieved E. What will happen when a blob D is added? Will I just get F with the next call to GetBlobsAsync or ....?

It is not guaranteed that the blob D will be listed in the next GetBlobsAsync call.

To guarantee valid listing behavior, start from the beginning of the GetBlobsAsync call.

@amnguye amnguye closed this as completed Feb 13, 2025
@JohanKlijn
Copy link
Author

Hi @amnguye,  

Can you be more specific on how this is working? In what kind of scenario's will the continuation token invalid/expired? In our case we need to process millions of blobs, and we need to make sure all the blobs are processed. As you can imagine when building an enterprise application we need to know what the behavior is of the continuation token? It should be documented somewhere because any application using this continuation token needs to be able to handle the situation when the token becomes invalid. The application can't just start from the beginning again, because probably the token becomes invalid again, right?

Regards,
Johan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

No branches or pull requests

2 participants