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

apply tower best practices to services when cloning inner services #2030

Merged
merged 6 commits into from
Nov 2, 2022

Conversation

garypen
Copy link
Contributor

@garypen garypen commented Oct 29, 2022

When I was investigating connection resets I noted that we weren't following tower documentation with respect to cloning inner services.

This PR addresses that. The change to the supergraph seems to be most invasive. I have run the tests manually many times and the change seems good, but probably worth closer examination.

When I was investigating connection resets I noted that we weren't
following tower documentation with respect to cloning inner services: https://docs.rs/tower/latest/tower/trait.Service.html#be-careful-when-cloning-inner-services

This PR addresses that. The change to the supergraph seems to be most
invasive. I have run the tests manually many times and the change seems
good, but probably worth closer examination.
@garypen garypen self-assigned this Oct 29, 2022
@github-actions

This comment has been minimized.

@garypen garypen requested review from BrynCooke and removed request for SimonSapin October 31, 2022 14:58
not worth raising a separate PR and this is still in flight...
NEXT_CHANGELOG.md Show resolved Hide resolved
// a valid course of action.
self.ready_query_planner_service
.get_or_insert_with(|| self.query_planner_service.clone())
self.query_planner_service
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is much cleaner 👍

@garypen garypen requested a review from Geal November 2, 2022 11:46
@garypen garypen merged commit 978fa66 into dev Nov 2, 2022
@garypen garypen deleted the garypen/service-ready branch November 2, 2022 16:43
@abernix abernix mentioned this pull request Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants