-
Notifications
You must be signed in to change notification settings - Fork 36
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
Chain elements should always pass Close down the chain #1468
Comments
List of elements that could cancel CloseThis is the list of elements in Open me
Some of these elements are fine.
|
Overview
Close
calls must clear all resources in one go.Unlike
Request
,Close
can not rely on retries.It is possible that
Close
will never succeed because some app has died or restarter.If
Close
reachesbegin
, if removes the connection event factory object, and all consequentClose
calls will do nothing.If some element mid-chain returned an error, then all elements down the chain will never get a Close call, and resources will leak.
Example
Imagine we have a chain like following:
discover
->setupDataPlane
discover
returns an error if there is something wrong with next app in path.If the endpoint died and
healClient
issued reselect-close, thendiscover
can't find the endpoint in registry and returns an error, and the data plane is never disposed of.I found and fixed this example when working on the reselect state implementation:
Additional considerations
retry.Close
method is pointless.additionalClenup()
here may never be calledregistry.Unregister
method. It seems like it also will never be repeated for a selected entry.The text was updated successfully, but these errors were encountered: