From b20e0189cfb0f991dd2923e4244daa4217b110f7 Mon Sep 17 00:00:00 2001 From: Arjan Bal Date: Mon, 23 Dec 2024 10:24:50 +0530 Subject: [PATCH] Fix comments --- balancer/pickfirst/pickfirstleaf/pickfirstleaf.go | 4 ++-- xds/internal/balancer/outlierdetection/subconn_wrapper.go | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/balancer/pickfirst/pickfirstleaf/pickfirstleaf.go b/balancer/pickfirst/pickfirstleaf/pickfirstleaf.go index 41f820297c00..76fa5fea95f2 100644 --- a/balancer/pickfirst/pickfirstleaf/pickfirstleaf.go +++ b/balancer/pickfirst/pickfirstleaf/pickfirstleaf.go @@ -55,8 +55,8 @@ func init() { } type ( - // enableHealthListenerKeyType is a unique key type used in resolver attributes - // to indicate whether the health listener usage is enabled. + // enableHealthListenerKeyType is a unique key type used in resolver + // attributes to indicate whether the health listener usage is enabled. enableHealthListenerKeyType struct{} // managedByPickfirstKeyType is an attribute key type to inform Outlier // Detection that the generic health listener is being used. diff --git a/xds/internal/balancer/outlierdetection/subconn_wrapper.go b/xds/internal/balancer/outlierdetection/subconn_wrapper.go index a0f9dcab093e..7d710fde1b2a 100644 --- a/xds/internal/balancer/outlierdetection/subconn_wrapper.go +++ b/xds/internal/balancer/outlierdetection/subconn_wrapper.go @@ -33,6 +33,9 @@ import ( // whether or not this SubConn is ejected. type subConnWrapper struct { balancer.SubConn + // addressInfo is a pointer to the subConnWrapper's corresponding address + // map entry, if the map entry exists. It is accessed atomically. + addressInfo unsafe.Pointer // *addressInfo // The following fields are set during object creation and read-only after // that. @@ -48,10 +51,7 @@ type subConnWrapper struct { // 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 - scUpdateCh *buffer.Unbounded + scUpdateCh *buffer.Unbounded // The following fields are only referenced in the context of a work // serializing buffer and don't need to be protected by a mutex.