Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

PickFirstLeafLoadBalancer may get stuck in Idle on backend address change

Aperta
#12,395 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
java

Direzione di ricerca

Inizia da core/src/main/java/io/grpc/internal/PickFirstLeafLoadBalancer.java, concentrandoti sull’aggiornamento del resolver, sulla rimozione dei subchannel, sullo stato del channel, sull’Idle picker e sui percorsi ExitIdle collegati nel report. Riproduci o ricostruisci la sequenza di eventi dalla correzione di grpc-go indicata e analizza i test esistenti di PickFirstLeafLoadBalancer, se disponibili. Il lavoro è completo quando una modifica dell’indirizzo del backend non può lasciare il balancer in IDLE senza riconnettersi ai nuovi endpoint.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

A bug was found in the new pickfirst balancer in gRPC Go which can cause the balancer to get stuck in IDLE state: https://github.com/grpc/grpc-go/pull/8615.

The implementation of the pickfirst LB in Java is similar, so it may suffer from the same issue. The order of events that lead to the bug is as follows:

  1. Existing connection breaks, the balancer requests re-resolution and reports IDLE. PF updates the channel state to IDLE with an Idle picker.
  2. An RPC is made, triggering the balancer to exit idle through the picker. The balancer attempts to re-connect the failed subchannel.
  3. The resolver produces a new endpoint list, removing the endpoint used by the existing subchannel. PF removes the existing subchannel. Since the balancer didn't update the channel state to CONNECTING yet, pickfirst thinks that it's still in IDLE and doesn't start connecting to the new endpoints.
  4. New RPC requests trigger the idle picker, but it's a no-op since it only triggers the balancer's ExitIdle method once.
Lingua principale
Java
Stelle
12.1k
Fork
4k
Merge medio
2g 1h
PR unite (30g)
31

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di grpc/grpc-java

Tutte le issue di grpc/grpc-java

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.