Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[router] remove store level metrics for non-streaming multiget #1306

Merged
merged 2 commits into from
Dec 10, 2024

Conversation

xunyin8
Copy link
Contributor

@xunyin8 xunyin8 commented Nov 15, 2024

[router] remove store level metrics for non-streaming multiget

The store level metrics in AggRouterHttpRequestStats are registered lazily. Add a flag in AggRouterHttpRequestStats to disable store level metric emission for non-streaming multiget request type. This is cleaner and the less intrusive than adding checks and handling elsewhere because AggRouterHttpRequestStats and the triggers to corresponding record functions are shared across different request types (SINGLE_GET, MULTI_GET, MULTI_GET_STREAMING, COMPUTE, etc...).

We will keep the total stats for non-streaming multiget to give us visibility in case any legacy clients start to make non-streaming multiget requests.

Fixed a bug where recordNoAvailableReplicaAbortedRetryRequest was calling the wrong method for the store metric recording.

How was this PR tested?

Existing and new tests

Does this PR introduce any user-facing changes?

  • No. You can skip the rest of this section.
  • Yes. Make sure to explain your proposed changes and call out the behavior change.

KaiSernLim
KaiSernLim previously approved these changes Nov 21, 2024
Copy link
Contributor

@KaiSernLim KaiSernLim left a comment

Choose a reason for hiding this comment

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

@m-nagarajan FYI: This PR will introduce some merge conflicts for #1303.

The store level metrics in AggRouterHttpRequestStats are registered lazily.
Add a flag in AggRouterHttpRequestStats to disable store level metric emission
for non-streaming multiget request type. This is cleaner and the less intrusive
than adding checks and handling elsewhere because AggRouterHttpRequestStats and
the triggers to corresponding record functions are shared across different
request types (SINGLE_GET, MULTI_GET, MULTI_GET_STREAMING, COMPUTE, etc...).

We will keep the total stats for non-streaming multiget to give us visibility
in case any legacy clients start to make non-streaming multiget requests.

Fixed a bug where recordNoAvailableReplicaAbortedRetryRequest was calling the
wrong method for the store metric recording.
@xunyin8 xunyin8 force-pushed the RemoveNonStreamingMetrics branch from 2fa4d9e to 8be1208 Compare December 9, 2024 04:10
m-nagarajan
m-nagarajan previously approved these changes Dec 9, 2024
Copy link
Contributor

@m-nagarajan m-nagarajan left a comment

Choose a reason for hiding this comment

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

Thanks @xunyin8

@xunyin8 xunyin8 merged commit 0da660e into linkedin:main Dec 10, 2024
51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants