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

Share Paging Termination Between PagedFlux and PagedIterable #26139

Merged

Conversation

alzimmermsft
Copy link
Member

Description

Fixes #26064

This PR resolves an issue where PagedFlux and PagedIterable handled terminating the paged request stream based on the continuation token received as they have divergent logic to handle idiosyncrasies of async vs sync and the usage of Reactor. Now, PagedIterable will use the paging termination Predicate from the backing PagedFlux and pass that into the ContinuationState that is being maintained during the lifetime of a paged request stream. In this change ContinuationState now takes the Predicate as a constructor argument instead of being passed when the continuation token is being updated to better align with the requirement of having the Predicate. This has simplified the divergent logic between PagedFlux and PagedIterable to a constructor call instead of being in a few places where the ContinuationState is being updated.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@alzimmermsft alzimmermsft added Client This issue points to a problem in the data-plane of the library. Azure.Core azure-core labels Dec 21, 2021
@alzimmermsft alzimmermsft self-assigned this Dec 21, 2021
@ghost ghost added the Storage Storage Service (Queues, Blobs, Files) label Dec 21, 2021
@alzimmermsft alzimmermsft merged commit 6b0c426 into Azure:main Dec 21, 2021
@alzimmermsft alzimmermsft deleted the AzStorage_TerminateListingOnNullAndEmpty branch December 21, 2021 21:03
@reta
Copy link
Contributor

reta commented Dec 22, 2021

Thanks a lot, @alzimmermsft !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Core azure-core Client This issue points to a problem in the data-plane of the library. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Infinite loop in BlobContainerClient::listBlobsByHierarchy and BlobContainerClient::listBlobs
4 participants