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

fix: fix replica::init_table_level_latency_counter metric name error #830

Merged
merged 3 commits into from
Aug 6, 2021

Conversation

zouweiming758
Copy link
Contributor

We should use taskcode(code).to_string() to get metric name , not taskcode(code) to get _internal_code.

@neverchanje neverchanje changed the title bugfix: fix replica::init_table_level_latency_counter metric name error fix: fix replica::init_table_level_latency_counter metric name error May 6, 2021
@neverchanje neverchanje closed this May 6, 2021
@neverchanje neverchanje reopened this May 6, 2021
@neverchanje neverchanje closed this May 7, 2021
@neverchanje neverchanje reopened this May 7, 2021
@neverchanje
Copy link
Contributor

Your code is not formatted. Please run clang-format-3.9 via ./scripts/linux/run-clang-format.sh.

@zouweiming758
Copy link
Contributor Author

Your code is not formatted. Please run clang-format-3.9 via ./scripts/linux/run-clang-format.sh.

it's ok,now. @neverchanje

@zouweiming758
Copy link
Contributor Author

please check this pr,thanks @neverchanje

@neverchanje
Copy link
Contributor

neverchanje commented May 13, 2021

Sorry for late response. Since I've been busy dealing with my personal issues these days, I didn't have the time to check and test if your modication works. Would you pls add some tests result in the desctiption? I will do some testing too later today.

@zhangyifan27
Copy link
Contributor

I tested it and found that the output is same whether using task_code(code) or task_code(code).to_string(), and of course task_code(code).to_string() is more formal.

@zouweiming758
Copy link
Contributor Author

I tested it and found that the output is same whether using task_code(code) or task_code(code).to_string(), and of course task_code(code).to_string() is more formal.

But when I use task_code(code), the output is _internal_code. Do you know why?

@zhangyifan27
Copy link
Contributor

zhangyifan27 commented May 26, 2021

I have no idea, maybe some convertions happened in the format function.
I added a log:

ddebug_f("counter str is {} vs {}", task_code(code), task_code(code).to_string());

And it turned out the output is the same in both ways:

D2021-05-26 14:10:20.988 (1622009420988640036 17174) replica.replica0.0301000000000001: replica.cpp:534:init_table_level_latency_counters(): counter str is RPC_RRDB_RRDB_BULK_LOAD vs RPC_RRDB_RRDB_BULK_LOAD
D2021-05-26 14:10:20.988 (1622009420988662951 17174) replica.replica0.0301000000000001: replica.cpp:534:init_table_level_latency_counters(): counter str is RPC_RRDB_RRDB_PUT vs RPC_RRDB_RRDB_PUT
D2021-05-26 14:10:20.988 (1622009420988671404 17174) replica.replica0.0301000000000001: replica.cpp:534:init_table_level_latency_counters(): counter str is RPC_RRDB_RRDB_MULTI_PUT vs RPC_RRDB_RRDB_MULTI_PUT
D2021-05-26 14:10:20.988 (1622009420988692532 17174) replica.replica0.0301000000000001: replica.cpp:534:init_table_level_latency_counters(): counter str is RPC_RRDB_RRDB_REMOVE vs RPC_RRDB_RRDB_REMOVE
D2021-05-26 14:10:20.988 (1622009420988701220 17174) replica.replica0.0301000000000001: replica.cpp:534:init_table_level_latency_counters(): counter str is RPC_RRDB_RRDB_MULTI_REMOVE vs RPC_RRDB_RRDB_MULTI_REMOVE
...

@levy5307
Copy link
Contributor

levy5307 commented Aug 6, 2021

@lidingshengHHU Thanks for your pull request. Merged

@levy5307 levy5307 merged commit 8a5bb4d into XiaoMi:master Aug 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants