-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
outlierdetection: Support health listener for ejection updates #7908
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7908 +/- ##
==========================================
+ Coverage 82.08% 82.16% +0.08%
==========================================
Files 379 379
Lines 38261 38360 +99
==========================================
+ Hits 31406 31519 +113
+ Misses 5551 5544 -7
+ Partials 1304 1297 -7
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't reviewed OD changes yet. Have to spend some time refreshing OD :(
xds/internal/balancer/outlierdetection/e2e_test/outlierdetection_test.go
Outdated
Show resolved
Hide resolved
xds/internal/balancer/outlierdetection/e2e_test/outlierdetection_test.go
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very close to LGTM. I think one or two points of discussion still.
xds/internal/balancer/outlierdetection/e2e_test/outlierdetection_test.go
Outdated
Show resolved
Hide resolved
0976fa0
to
1af2206
Compare
xds/internal/balancer/outlierdetection/e2e_test/outlierdetection_test.go
Outdated
Show resolved
Hide resolved
4c60234
to
056e0ae
Compare
// to indicate whether the health listener usage is enabled. | ||
type enableHealthListenerKeyType struct{} | ||
type ( | ||
// enableHealthListenerKeyType is a unique key type used in resolver attributes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super minor nit: Please try to wrap comment lines at 80-cols.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrapped the comment.
// changes are complete, all SubConns will be created by pick_first and | ||
// outlier detection will only use the health listener for ejection and | ||
// this field can be removed. | ||
healthListenerEnabled bool | ||
|
||
// addressInfo is a pointer to the subConnWrapper's corresponding address | ||
// map entry, if the map entry exists. | ||
addressInfo unsafe.Pointer // *addressInfo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if I brought this up earlier. But the addressInfo
field can change during UpdateAddresses
. So, I don't think it is correct to have this field under the read-only-after-creation group of fields.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move it to the top and mentioned that it's accessed atomically.
Should we release note this? It is not something that is going to be very visible to users, but if at all there is some behavior change that they observe, a release note might be helpful? |
The old mechanism of ejection using the raw connectivity listener should remain unchanged. When petiole policies start delegating to pickfirst, they will start using health listeners. We can add release notes when each policy starts delegating to pickfirst. |
As part of the dualstack changes described in A61, ejection updates need to be delivered through the health listener instead of the raw connectivity listener.
Outlier Detection will continue to support ejection via the regular connectivity listener till all petiole policies start delegating to
pickfirst
. To make OD aware that it should not send ejection updates on the regularSubConn
state listener, similar to c-core, a balancer attribute is set in pickfirst which is is picked up in OD while interceptingNewSubConn()
calls.RELEASE NOTES: N/A