mochengqian commented on code in PR #971:
URL: https://github.com/apache/dubbo-go-pixiu/pull/971#discussion_r3371969876
##########
pkg/cluster/loadbalancer/load_balancer.go:
##########
@@ -63,20 +64,45 @@ type SnapshotLoadBalancer interface {
HandlerWithSnapshot(c PickContext, policy model.LbPolicy)
*model.Endpoint
}
-// HealthyOnlySnapshotLoadBalancer marks snapshot-aware balancers that do not
-// need PickContext.AllEndpoints. Unmarked snapshot balancers keep receiving
-// the full snapshot for compatibility with custom implementations.
+// HealthyOnlySnapshotLoadBalancer is retained for source compatibility with
+// callers that referenced the old marker contract.
+//
+// Deprecated: runtime fast-path decisions ignore this interface. Only trusted
+// in-tree balancers can opt in via SnapshotOptIn returning snapshotopt.Token.
type HealthyOnlySnapshotLoadBalancer interface {
UseHealthyEndpointsOnly() bool
}
-// ZeroCopySnapshotLoadBalancer marks trusted balancers that never mutate or
-// retain snapshot endpoints. Other snapshot balancers receive defensive
-// copies.
+// ZeroCopySnapshotLoadBalancer is retained for source compatibility with
+// callers that referenced the old marker contract.
+//
+// Deprecated: runtime fast-path decisions ignore this interface. Only trusted
+// in-tree balancers can opt in via SnapshotOptIn returning snapshotopt.Token.
type ZeroCopySnapshotLoadBalancer interface {
UseZeroCopySnapshot() bool
}
Review Comment:
Resolved by removing the interfaces. The markers were added in #932 and
never shipped in a tagged release, so there is no external caller to stay
source-compatible with — keeping them as Deprecated only contradicted the PR
goal. In fceeb80d both `HealthyOnlySnapshotLoadBalancer` and
`ZeroCopySnapshotLoadBalancer` are deleted, and the PR description is updated
to match.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]