Skip to content

Commit

Permalink
Fix ReadEntryProcessor v2 SchedulingDelayStats (apache#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`
  • Loading branch information
AnonHxy committed Feb 27, 2023
1 parent 7f263fa commit 08ef649
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,15 @@ protected void sendResponseAndWait(int rc, Object response, OpStatsLogger statsL

@Override
public void run() {
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 08ef649

Please sign in to comment.