-
Notifications
You must be signed in to change notification settings - Fork 892
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 ReadEntryProcessor v2 SchedulingDelayStats #3758
Fix ReadEntryProcessor v2 SchedulingDelayStats #3758
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3758 +/- ##
=========================================
Coverage ? 47.36%
Complexity ? 4501
=========================================
Files ? 468
Lines ? 40840
Branches ? 5236
=========================================
Hits ? 19343
Misses ? 19501
Partials ? 1996
Flags with carried forward coverage won't be shown. Click here to find out more. 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -166,8 +166,14 @@ protected void sendResponseAndWait(int rc, Object response, OpStatsLogger statsL | |||
|
|||
@Override | |||
public void run() { | |||
requestProcessor.getRequestStats().getWriteThreadQueuedLatency() | |||
.registerSuccessfulEvent(MathUtils.elapsedNanos(enqueueNanos), TimeUnit.NANOSECONDS); | |||
if (this instanceof ReadEntryProcessor) { |
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.
Use request instanceof BookieProtocol.ReadRequest
?
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.
OK. It makes senses to me. This could uniform the code style. Updated @hangc0276
@lordcheng10 Please help take a look at this Pr, thanks. |
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.
LGTM
@hangc0276 Should the following code also use ParsedAddRequest to judge? for example: bookkeeper/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/PacketProcessorBase.java Lines 178 to 180 in accaa69
|
I think it looks like a bug that we shoud use Try to fix this bug here #3761 |
@StevenLuMT @hangc0276 PTAL |
@hangc0276 PTAL |
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.
LGTM
Descriptions of the changes in this PR: We registered `ReadEntrySchedulingDelayStats` of `ReadEntryProcessor` as `WriteThreadQueuedLatency` mistakenly, so we need fix it. Register `ReadEntrySchedulingDelayStats` if `ReadEntryProcessor` (cherry picked from commit 08ef649)
Descriptions of the changes in this PR: ### Motivation We registered `ReadEntrySchedulingDelayStats` of `ReadEntryProcessor` as `WriteThreadQueuedLatency` mistakenly, so we need fix it. ### Changes Register `ReadEntrySchedulingDelayStats` if `ReadEntryProcessor` (cherry picked from commit 08ef649)
Descriptions of the changes in this PR:
Motivation
We registered
ReadEntrySchedulingDelayStats
ofReadEntryProcessor
asWriteThreadQueuedLatency
mistakenly, so we need fix it.Changes
Register
ReadEntrySchedulingDelayStats
ifReadEntryProcessor