Skip to content

Fix multiple dictionary add in polly #37533

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

Merged
merged 2 commits into from
Oct 14, 2021
Merged

Conversation

Tratcher
Copy link
Member

Fixes 6.0-rc2 customer feedback 8d5212d#r57959949

#36162 previously fixed an issue with undisposed responses when retrying requests. Unfortunately, it introduced a regression if you have multiple policies, throwing a duplicate dictionary key exception for the second policy.

The fix is to use the dictionary indexer instead of Add. The disposal logic is idempotent, it doesn't matter if it runs multiple times.

This needs to be backported to 6.0.

@Tratcher Tratcher enabled auto-merge (squash) October 13, 2021 23:07
@Tratcher
Copy link
Member Author

/backport to release/6.0

@github-actions
Copy link
Contributor

Started backporting to release/6.0: https://github.com/dotnet/aspnetcore/actions/runs/1339596313

@github-actions
Copy link
Contributor

@Tratcher an error occurred while backporting to release/6.0, please check the run log for details!

Error: @Tratcher is not a repo collaborator, backporting is not allowed.

@Tratcher Tratcher merged commit dc6bfe9 into dotnet:main Oct 14, 2021
@Tratcher Tratcher deleted the tratcher/polly branch October 14, 2021 00:44
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants