-
Notifications
You must be signed in to change notification settings - Fork 86
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
base: main
Are you sure you want to change the base?
Conversation
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.
There was a problem hiding this 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.
@@ -29,14 +32,18 @@ public AggRouterHttpRequestStats( | |||
ReadOnlyStoreRepository metadataRepository, | |||
boolean isUnregisterMetricForDeletedStoreEnabled) { | |||
super(metricsRepository, metadataRepository, isUnregisterMetricForDeletedStoreEnabled); | |||
// Disable store level non-streaming multi get stats reporting because it's no longer used in clients. We still | |||
// report to the total stats for visibility of potential old clients. | |||
isStoreStatsEnabled = !RequestType.MULTI_GET.equals(requestType); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we just remove MULTI_GET? Do we have any use cases for this?
if (isStoreStatsEnabled) { | ||
return scatterGatherStatsMap.computeIfAbsent(storeName, k -> new ScatterGatherStats()); | ||
} else { | ||
return totalScatterGatherStats; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this result in dual recording of the total stats?
if we are checking isStoreStatsEnabled
and not recording the store stats as seen in recordStoreStats()
, should we clean this to not return anything?
[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?