-
Notifications
You must be signed in to change notification settings - Fork 219
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
Fix #1269 A bug on the metric calculation inside async API clients #1270
Fix #1269 A bug on the metric calculation inside async API clients #1270
Conversation
@@ -80,9 +80,9 @@ public <T extends AuditApiResponse> CompletableFuture<T> execute( | |||
}, executorService); | |||
} | |||
|
|||
private void initCurrentQueueSizeStatsIfAbsent(String teamId, String methodNameWithSuffix) { | |||
private void syncCurrentQueueSizeStats(String teamId, String methodNameWithSuffix) { |
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.
Since this method is a private one, we can safely rename it to represent more accurate behavior.
@@ -264,13 +264,6 @@ public void updateCurrentQueueSize(String executorName, String teamId, String me | |||
@Override | |||
public void setCurrentQueueSize(String executorName, String teamId, String methodName, Integer size) { | |||
if (this.isStatsEnabled()) { | |||
CopyOnWriteArrayList<String> messageIds = getOrCreateMessageIds(executorName, teamId, methodName); |
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.
These lines of code are completely unnecessary. They are just an overhead when executing this method.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1270 +/- ##
============================================
+ Coverage 74.33% 74.35% +0.01%
- Complexity 4124 4125 +1
============================================
Files 443 443
Lines 13092 13080 -12
Branches 1324 1323 -1
============================================
- Hits 9732 9725 -7
+ Misses 2588 2582 -6
- Partials 772 773 +1 ☔ View full report in Codecov by Sentry. |
This pull request resolves #1269, thank you so much @gunrein !
The bug had been affecting only the output of the visible metrics data for developers. The internal smart rate limiter mechanism does not use the data at all, so the impact of the misbehavior should be relatively small.
Category (place an
x
in each of the[ ]
)Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you agree to those rules.