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

About poller freq limitation #17018

Closed
tadelesh opened this issue Feb 9, 2022 · 6 comments
Closed

About poller freq limitation #17018

tadelesh opened this issue Feb 9, 2022 · 6 comments
Assignees
Labels
Azure.Core Client This issue points to a problem in the data-plane of the library. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@tadelesh
Copy link
Member

tadelesh commented Feb 9, 2022

I found there exists a limit for the LRO polling interval. When I use the test proxy to do the scenario test, it will be hard to work around it for playback and cause the test duration too long. I know the way to handle it is to remove all the redundant polling tries in recording file, but it is not so convenient. I wonder this limit can be removed or any other better solution?

@ghost ghost added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Feb 9, 2022
@tadelesh tadelesh removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Feb 9, 2022
@jhendrixMSFT
Copy link
Member

We set a floor to ensure that customers didn't accidentally specify too small a value and flood the endpoint with requests.

If this is problematic, the only solution is to write your own polling loop and not use PollUntilDone().

@seankane-msft
Copy link
Member

@tadelesh can you provide a sample or PR for the issue you are seeing?

@jhendrixMSFT what is the floor for the time between requests? Can't we use the floor when we're in playback mode and otherwise use a more reasonable value?

@jhendrixMSFT
Copy link
Member

The floor is one second and is baked into the internal poller type. I suppose we could detect if we're running a test and disable the check.

@seankane-msft
Copy link
Member

poller := MyPoller{}
switch recording.GetRecordingMode() {
case recording.PlaybackMode:
        // manual polling
default:
        poller.PollUntilDone(...)
        ...
}

It's not the cleanest code, but this can be put into a function and re-used I think. We can also look at adding it to the internal package.

@jhendrixMSFT
Copy link
Member

Good idea, and generics should make this reusable.

@tadelesh
Copy link
Member Author

@jhendrixMSFT Thanks for the solution.
@seankane-msft The sample is here. For now, I need to add custom loop to handle response when playback. It can be abstract to a reusable func after generics support of poller.

@RickWinter RickWinter added Azure.Core Client This issue points to a problem in the data-plane of the library. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Feb 10, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Core Client This issue points to a problem in the data-plane of the library. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

4 participants