Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

feat: add perf counter to record dropped timeout rpc count #859

Merged
merged 1 commit into from
Jul 22, 2021

Conversation

hycdong
Copy link
Contributor

@hycdong hycdong commented Jul 21, 2021

As the issue pegasus#786 shows, if the in-queue time of request has already exceed its client timeout, it should not be executed, because client has already been timeout.
This pull request is add the perf-counter to record the count of those dropped requests.

I test it on onebox with printing perf-counters and set read/write timeout as 10ms, the logs are like:

W2021-07-21 16:58:32.311 (1626857912311375216 15077) replica.local_app0.03003aa8001de7b7: rpc_task.cpp:441:exec(): rpc_request_task(RPC_RRDB_RRDB_GET) from(ip:port) stop to execute due to timeout_ms(10) exceed
W2021-07-21 16:58:33.268 (1626857913268678037 15066) replica.replica1.03003aa8001e0587: rpc_task.cpp:441:exec(): rpc_request_task(RPC_RRDB_RRDB_PUT) from(ip:port) stop to execute due to timeout_ms(10) exceed

The printed perf-counters are like:

[zion*profiler*RPC_RRDB_RRDB_GET.rpc.dropped, NUMBER, 17.00]
[zion*profiler*RPC_RRDB_RRDB_PUT.rpc.dropped, NUMBER, 133.00]

@hycdong hycdong added the type/perf-counter PR that made modification on perf-counter, which should be noted in release note. label Jul 21, 2021
@levy5307 levy5307 merged commit 47871eb into XiaoMi:master Jul 22, 2021
@hycdong hycdong deleted the profile_rpc_drop_count branch July 22, 2021 06:53
hycdong added a commit to hycdong/rdsn that referenced this pull request Sep 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/perf-counter PR that made modification on perf-counter, which should be noted in release note.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants