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

Fix issue 5972 #6684

Merged
merged 1 commit into from
Nov 15, 2024
Merged

Fix issue 5972 #6684

merged 1 commit into from
Nov 15, 2024

Conversation

karolz-ms
Copy link
Member

@karolz-ms karolz-ms commented Nov 15, 2024

Description

Turns out that we did not wait long enough for the Container graceful stop to occur during restart sequence. This change tweaks the timeout used there.

Honestly I am not exactly sure how Polly calculates the exponential delay periods. Mathematically the original retry strategy settings should have been sufficient, but in reality we have been waiting too short. Polly also lacks the equivalent of MaxElapsedTime present in other retry frameworks, so I have verified experimentally that the current settings give desired max retry time.

Fixes #5972

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No (current tests sufficient)
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?
Microsoft Reviewers: Open in CodeFlow

Turns out that we did not wait long enough for the Container graceful stop to occur during restart sequence
@JamesNK JamesNK enabled auto-merge (squash) November 15, 2024 04:02
@JamesNK JamesNK merged commit c0ff16d into main Nov 15, 2024
9 checks passed
@JamesNK JamesNK deleted the dev/karolz/issue5972 branch November 15, 2024 04:50
@davidfowl
Copy link
Member

cc @martincostello for polly comment

@martincostello
Copy link
Member

For the behaviour you're after (don't exceed this amount of time in total) you'd typically add a timeout policy to the resilience pipeline. Then the cancellation token for that would be passed from the timeout policy to the retry one, and it would observe it and terminate the retries when it's signalled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants