-
Notifications
You must be signed in to change notification settings - Fork 11
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
do not invoke next.Close when connection not established #23
do not invoke next.Close when connection not established #23
Conversation
Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@est.tech>
01075a0
to
7c2b1df
Compare
I'd recommend not using the Path to determine 'established'... instead fall back on fundamentals. Since the normal pattern is:
If a particular chain element experiences an error trying to do its work, it should call Close from itself down, to signal to all downstream chain elements to clean up after themselves, and then return an error. But that 'Close' should only occur if the error originates in the chain element itself, if the error is returned from the downstream chain, the chain element should simply return the error up the chain. Since the chain element does its work on the return chain, simply returning the error means the chain element doesn't create the state it would otherwise need to cleanup. |
Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@est.tech>
yes, I totally forgot about this, now changed it back to use local metadata cache for connection established check.
Yes Ed, this pattern is followed in client chain elements. The server chain elements slight vary from this i.e. |
While there is always an exception to every rule... as a rule I find it is actually good to follow the 'add information/make decisions' on the call side of the Request and 'do work' on the return side works best for most server chain elements (especially for forwarders that are passthroughs). |
@edwarnicke created an issue #25 to track this work separately as it needs changes across other sdk repos too and realign of xconnect endpoint chain. |
…k-ovs@main PR link: networkservicemesh/sdk-ovs#23 Commit: 17e2053 Author: peri Date: 2021-09-23 10:43:22 +0200 Message: - Merge pull request #23 from Nordix/fix-stale-entries Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
This fixes too many stale interface and ovs port entries upon service request failure (due to
IP Pool Empty
error).Signed-off-by: Periyasamy Palanisamy periyasamy.palanisamy@est.tech
Description
Issue link
How Has This Been Tested?
Types of changes