File tree Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -151,17 +151,14 @@ export class ClusterResourceType extends XdsResourceType {
151
151
}
152
152
} ;
153
153
} else if ( EXPERIMENTAL_RING_HASH && message . lb_policy === 'RING_HASH' ) {
154
- if ( ! message . ring_hash_lb_config ) {
154
+ if ( message . ring_hash_lb_config && message . ring_hash_lb_config . hash_function !== 'XX_HASH' ) {
155
155
return null ;
156
156
}
157
- if ( message . ring_hash_lb_config . hash_function !== 'XX_HASH' ) {
158
- return null ;
159
- }
160
- const minRingSize = message . ring_hash_lb_config . minimum_ring_size ? Number ( message . ring_hash_lb_config . minimum_ring_size . value ) : 1024 ;
157
+ const minRingSize = message . ring_hash_lb_config ?. minimum_ring_size ? Number ( message . ring_hash_lb_config . minimum_ring_size . value ) : 1024 ;
161
158
if ( minRingSize > 8_388_608 ) {
162
159
return null ;
163
160
}
164
- const maxRingSize = message . ring_hash_lb_config . maximum_ring_size ? Number ( message . ring_hash_lb_config . maximum_ring_size . value ) : 8_388_608 ;
161
+ const maxRingSize = message . ring_hash_lb_config ? .maximum_ring_size ? Number ( message . ring_hash_lb_config . maximum_ring_size . value ) : 8_388_608 ;
165
162
if ( maxRingSize > 8_388_608 ) {
166
163
return null ;
167
164
}
Original file line number Diff line number Diff line change @@ -96,9 +96,6 @@ export class FakeEdsCluster implements FakeCluster {
96
96
} ;
97
97
if ( this . loadBalancingPolicyOverride === 'RING_HASH' ) {
98
98
result . lb_policy = 'RING_HASH' ;
99
- result . ring_hash_lb_config = {
100
- hash_function : 'XX_HASH'
101
- } ;
102
99
} else if ( this . loadBalancingPolicyOverride ) {
103
100
result . load_balancing_policy = {
104
101
policies : [
You can’t perform that action at this time.
0 commit comments