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

update deputy middleware to properly close channel between connections #680

Merged
merged 1 commit into from Jan 22, 2020

Conversation

nicktur100
Copy link
Contributor

@nicktur100 nicktur100 commented Jan 7, 2020

Change deputy middleware to open a new channel, rather than use a sub-channel and edit the Peers list.
From tchannel code:

// Remove removes a peer from the peer list. It returns an error if the peer cannot be found.
// Remove does not affect connections to the peer in any way.

Observed that with the subchannel implementation, connections using deputy would work sporadically, especially soon after a service restart, but would start failing later, possibly after the Cerberus CLI session was restarted.

Creating a new channel and closing it is consistent with the more generic middleware supported by Cerberus/Deputy team.

See https://code.uberinternal.com/T4892307 for internal Uber details

@claassistantio
Copy link

claassistantio commented Jan 7, 2020

CLA assistant check
All committers have signed the CLA.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.04%) to 69.803% when pulling 28e2ad0 on nturner/deputy-fix into e668e50 on master.

@nicktur100 nicktur100 merged commit 63e5058 into master Jan 22, 2020
@nicktur100 nicktur100 deleted the nturner/deputy-fix branch January 23, 2020 01:41
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.

None yet

4 participants