Skip to content

Conversation

akyang-anyscale
Copy link
Contributor

@akyang-anyscale akyang-anyscale commented Aug 27, 2025

Why are these changes needed?

This PR caches the num handle requests value and updates the metric async instead of on the critical path.

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: akyang-anyscale <[email protected]>
@akyang-anyscale akyang-anyscale requested a review from a team as a code owner August 27, 2025 16:42
@akyang-anyscale akyang-anyscale added the go add ONLY when ready to merge, run all tests label Aug 27, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces caching for handle request metrics, moving the updates to an asynchronous task to improve performance on the critical path. The implementation is sound and correctly plumbed through the necessary components. I've pointed out a couple of opportunities to refactor duplicated code to enhance maintainability. Overall, this is a solid improvement.

Signed-off-by: akyang-anyscale <[email protected]>
Signed-off-by: akyang-anyscale <[email protected]>
@ray-gardener ray-gardener bot added the serve Ray Serve Related Issue label Aug 27, 2025
@akyang-anyscale akyang-anyscale marked this pull request as draft August 27, 2025 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go add ONLY when ready to merge, run all tests serve Ray Serve Related Issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant