weiqingy commented on issue #724:
URL: https://github.com/apache/flink-agents/issues/724#issuecomment-4598852880

   Thanks for the detailed write-up and repro.
   To confirm the connection you noted: the thread-safety issue was addressed 
on `main` as a side effect of #548 (`f8eac10`), which moved resource caching 
out of `AgentPlan` and into a dedicated `ResourceCache`, where `getResource` is 
synchronized. That refactor isn’t on `release-0.2`, so the race is still 
present there. I didn’t backport it to 0.2.
   
   Rather than backporting the full `ResourceCache` extraction to a maintenance 
branch, the minimal equivalent fix for `release-0.2` is to make 
`AgentPlan#getResource` itself synchronized. That uses the same mechanism as 
`main`; the intrinsic lock is reentrant, so the nested resource-resolution 
callback is fine. I’d also include the regression test from your repro.
   
   Do you already have a fix on your side? If not, I’ll put up a backport PR 
against `release-0.2`. Assigning this to myself for now.
   


-- 
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]

Reply via email to