@@ -128,7 +128,6 @@ final class CachingRlsLbClient {
128128 private final RlsLbHelper helper ;
129129 private final ManagedChannel rlsChannel ;
130130 private final RouteLookupServiceStub rlsStub ;
131- private final RlsRequestFactory requestFactory ;
132131 private final RlsPicker rlsPicker ;
133132 private final ResolvedAddressFactory childLbResolvedAddressFactory ;
134133 @ GuardedBy ("lock" )
@@ -197,7 +196,7 @@ private CachingRlsLbClient(Builder builder) {
197196 ChannelLogLevel .DEBUG , "Can not get hostname from authority: {0}" , helper .getAuthority ());
198197 serverHost = helper .getAuthority ();
199198 }
200- requestFactory = new RlsRequestFactory (
199+ RlsRequestFactory requestFactory = new RlsRequestFactory (
201200 lbPolicyConfig .getRouteLookupConfig (), serverHost );
202201 rlsPicker = new RlsPicker (requestFactory , rlsConfig .lookupService ());
203202 // It is safe to use helper.getUnsafeChannelCredentials() because the client authenticates the
@@ -303,7 +302,7 @@ private CachedRouteLookupResponse asyncRlsCall(
303302 // on this result
304303 return CachedRouteLookupResponse .backoffEntry (createBackOffEntry (
305304 routeLookupRequestKey , Status .RESOURCE_EXHAUSTED .withDescription ("RLS throttled" ),
306- backoffPolicy , routeLookupReason ));
305+ backoffPolicy ));
307306 }
308307 final SettableFuture <RouteLookupResponse > response = SettableFuture .create ();
309308 io .grpc .lookup .v1 .RouteLookupRequest routeLookupRequest = REQUEST_CONVERTER .convert (
@@ -417,7 +416,7 @@ private void pendingRpcComplete(PendingCacheEntry entry) {
417416 // reattempt picks when the child LB is done connecting
418417 } catch (Exception e ) {
419418 createBackOffEntry (entry .routeLookupRequestKey , Status .fromThrowable (e ),
420- entry .backoffPolicy , entry . routeLookupReason );
419+ entry .backoffPolicy );
421420 // Cache updated. updateBalancingState() to reattempt picks
422421 helper .triggerPendingRpcProcessing ();
423422 }
@@ -439,9 +438,8 @@ private DataCacheEntry createDataEntry(
439438 }
440439
441440 @ GuardedBy ("lock" )
442- private BackoffCacheEntry createBackOffEntry (
443- RouteLookupRequestKey routeLookupRequestKey , Status status ,
444- @ Nullable BackoffPolicy backoffPolicy , RouteLookupRequest .Reason routeLookupReason ) {
441+ private BackoffCacheEntry createBackOffEntry (RouteLookupRequestKey routeLookupRequestKey ,
442+ Status status , @ Nullable BackoffPolicy backoffPolicy ) {
445443 if (backoffPolicy == null ) {
446444 backoffPolicy = backoffProvider .get ();
447445 }
@@ -450,8 +448,7 @@ private BackoffCacheEntry createBackOffEntry(
450448 ChannelLogLevel .DEBUG ,
451449 "[RLS Entry {0}] Transition to back off: status={1}, delayNanos={2}" ,
452450 routeLookupRequestKey , status , delayNanos );
453- BackoffCacheEntry entry = new BackoffCacheEntry (routeLookupRequestKey , status , backoffPolicy ,
454- routeLookupReason );
451+ BackoffCacheEntry entry = new BackoffCacheEntry (routeLookupRequestKey , status , backoffPolicy );
455452 // Lock is held, so the task can't execute before the assignment
456453 entry .scheduledFuture = scheduledExecutorService .schedule (
457454 () -> refreshBackoffEntry (entry ), delayNanos , TimeUnit .NANOSECONDS );
@@ -469,7 +466,7 @@ private void refreshBackoffEntry(BackoffCacheEntry entry) {
469466 logger .log (ChannelLogLevel .DEBUG ,
470467 "[RLS Entry {0}] Calling RLS for transition to pending" , entry .routeLookupRequestKey );
471468 linkedHashLruCache .invalidate (entry .routeLookupRequestKey );
472- asyncRlsCall (entry .routeLookupRequestKey , entry .backoffPolicy , entry . routeLookupReason );
469+ asyncRlsCall (entry .routeLookupRequestKey , entry .backoffPolicy , RouteLookupRequest . Reason . REASON_MISS );
473470 }
474471 }
475472
@@ -779,15 +776,13 @@ private static final class BackoffCacheEntry extends CacheEntry {
779776
780777 private final Status status ;
781778 private final BackoffPolicy backoffPolicy ;
782- private final RouteLookupRequest .Reason routeLookupReason ;
783779 private Future <?> scheduledFuture ;
784780
785781 BackoffCacheEntry (RouteLookupRequestKey routeLookupRequestKey , Status status ,
786- BackoffPolicy backoffPolicy , RouteLookupRequest . Reason routeLookupReason ) {
782+ BackoffPolicy backoffPolicy ) {
787783 super (routeLookupRequestKey );
788784 this .status = checkNotNull (status , "status" );
789785 this .backoffPolicy = checkNotNull (backoffPolicy , "backoffPolicy" );
790- this .routeLookupReason = checkNotNull (routeLookupReason , "routeLookupReason" );
791786 }
792787
793788 Status getStatus () {
0 commit comments