rls: Avoid missed config update from reentrancy (v1.76.x backport) by ejona86 · Pull Request #12550 · grpc/grpc-java (original) (raw)

@ejona86

Since ChildPolicyWrapper() called into the child before childPolicyMap.put(), it is possible for that child to call back into RLS and further update state without that child being known. When CDS is_dynamic=true (since ca99a8c), it registers the cluster with XdsDependencyManager, which adds a watch to XdsClient. If XdsClient already has the results cached then the watch callback can be enqueued immediately onto the syncContext and execute still within the constructor.

Calling into the child with the lock held isn't great, as it allows for this type of reentrancy bug. But that'll take larger changes to fix.

b/464116731

@ejona86 mentioned this pull request

Dec 4, 2025

kannanjgithub

@ejona86 ejona86 deleted the backport-rls-missed-update-1.76 branch

December 5, 2025 17:00

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators

Mar 6, 2026

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})