Skip to content

Commit

Permalink
Fix ReadEntryProcessor v2 SchedulingDelayStats (#3758)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
AnonHxy authored and zymap committed Dec 6, 2023
1 parent 608f9f0 commit 2eb1c36
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,15 @@ protected void sendResponseAndWait(int rc, Object response, OpStatsLogger statsL

@Override
public void safeRun() {
requestProcessor.getRequestStats().getWriteThreadQueuedLatency()
.registerSuccessfulEvent(MathUtils.elapsedNanos(enqueueNanos), TimeUnit.NANOSECONDS);
if (request instanceof BookieProtocol.ReadRequest) {
requestProcessor.getRequestStats().getReadEntrySchedulingDelayStats()
.registerSuccessfulEvent(MathUtils.elapsedNanos(enqueueNanos), TimeUnit.NANOSECONDS);
}
if (request instanceof BookieProtocol.ParsedAddRequest) {
requestProcessor.getRequestStats().getWriteThreadQueuedLatency()
.registerSuccessfulEvent(MathUtils.elapsedNanos(enqueueNanos), TimeUnit.NANOSECONDS);
}

if (!isVersionCompatible()) {
sendResponse(BookieProtocol.EBADVERSION,
ResponseBuilder.buildErrorResponse(BookieProtocol.EBADVERSION, request),
Expand Down

0 comments on commit 2eb1c36

Please sign in to comment.