joeyutong commented on PR #870:
URL: https://github.com/apache/flink-agents/pull/870#issuecomment-4932476675

   I agree that pre-resolving the metric handles at binding time addresses the 
lazy-map race, as I mentioned above. My remaining concern is that metric 
recording would still update the pre-resolved counters from arbitrary caller 
threads. Although this avoids concurrent `MetricGroup` lookup, it still 
requires the counters to support concurrent updates and moves metric mutation 
outside the single-threaded action/mailbox boundary.
   
   I am not sure whether that is consistent with the intended single-threaded 
access contract of the current metric abstraction, so I would prefer not to 
pursue this direction in this PR for now. This is also why I suggested 
narrowing the PR to usage extraction and usage-returning APIs.


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