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

Verify max value for maxPollingInterval #34858

Open
hossam-nasr opened this issue Mar 11, 2023 · 0 comments
Open

Verify max value for maxPollingInterval #34858

hossam-nasr opened this issue Mar 11, 2023 · 0 comments
Labels
Client This issue points to a problem in the data-plane of the library. Storage Storage Service (Queues, Blobs, Files)

Comments

@hossam-nasr
Copy link
Contributor

Library name

Microsoft.Azure.WebJobs.Extensions.Storage

Please describe the feature.

This issue was inspired by this CRI. Track 1 version: Azure/azure-webjobs-sdk#2967.

In the storage queue extension trigger, the extension polls the queue in extension to check for new messages. If it fails, it waits a certain amount of time, the polling interval, between polling the queue again. The polling algorithm is described in the docs here. The polling interval increases exponentially in the case of failure, up to a maximum value of the maxPollingInterval set by the user (default is 1 minute). However, if the user misconfigures the maxPollingInterval property (as was the case in the CRI), it can result in very long polling intervals, leading to periods of downtime in the app. We have a safeguard to check against a minimum value of maxPollingInterval, but we should add a check for an upper on that value as well, to at least warn the user about the potential problems.

This is also exacerbated by how maxPollingInterval relies on the TimeSpan.Parse() function:

TimeSpan ts = TimeSpan.Parse("10000");
Console.WriteLine(ts);
Console.WriteLine($"TotalDays: {ts.TotalDays}");

Output:

10000.00:00:00
TotalDays: 10000

Which makes it easy to accidentally configure an almost infinitely long maxPollingInterval

@ghost ghost added the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Mar 11, 2023
@hossam-nasr hossam-nasr added the Storage Storage Service (Queues, Blobs, Files) label Mar 11, 2023
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Mar 11, 2023
@jsquire jsquire added Client This issue points to a problem in the data-plane of the library. Functions labels Mar 11, 2023
@jsquire jsquire removed the Functions label Mar 4, 2024
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. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

No branches or pull requests

2 participants