Re: [PR] [enhance](meta-service)add bvar for ms kv read write count [doris]
gavinchou commented on code in PR #51708:
URL: https://github.com/apache/doris/pull/51708#discussion_r2148982041
##
cloud/src/common/bvars.cpp:
##
@@ -186,4 +188,180 @@ BvarStatusWithTag
g_bvar_inverted_checker_abnormal_delete_bitmaps("chec
BvarStatusWithTag
g_bvar_inverted_checker_delete_bitmaps_scanned("checker",
"delete_bitmap_keys_scanned");
BvarStatusWithTag
g_bvar_max_rowsets_with_useless_delete_bitmap_version("checker",
"max_rowsets_with_useless_delete_bitmap_version");
+// rpc kv rw count
Review Comment:
seems lack of instance level stats
we may need to add `instance_id` a mbvar label.
##
cloud/src/meta-service/meta_service_helper.h:
##
@@ -232,16 +233,23 @@ inline MetaServiceCode cast_as(TxnErrorCode code) {
brpc::ClosureGuard closure_guard(done);
\
[[maybe_unused]] std::stringstream ss;
\
[[maybe_unused]] MetaServiceCode code = MetaServiceCode::OK;
\
+[[maybe_unused]] std::unique_ptr txn;
\
[[maybe_unused]] std::string msg;
\
[[maybe_unused]] std::string instance_id;
\
[[maybe_unused]] bool drop_request = false;
\
+[[maybe_unused]] KVStats stats(g_bvar_rpc_kv_##func_name##_read_counter,
\
+ g_bvar_rpc_kv_##func_name##_write_counter);
\
std::unique_ptr> defer_status((int*)0x01,
[&](int*) { \
response->mutable_status()->set_code(code);
\
response->mutable_status()->set_msg(msg);
\
finish_rpc(#func_name, ctrl, response);
\
closure_guard.reset(nullptr);
\
if (config::use_detailed_metrics && !instance_id.empty() &&
!drop_request) { \
Review Comment:
does dropped request has any attached metrics?
if no, we should add one
##
cloud/src/meta-service/mem_txn_kv.h:
##
@@ -29,6 +30,7 @@
#include
#include
+#include "common/stats.h"
Review Comment:
what is this for?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
Re: [PR] [enhance](meta-service)add bvar for ms kv read write count [doris]
koarz commented on code in PR #51708: URL: https://github.com/apache/doris/pull/51708#discussion_r2148976070 ## cloud/src/meta-service/meta_service.cpp: ## @@ -250,7 +254,7 @@ void MetaServiceImpl::get_version(::google::protobuf::RpcController* controller, } code = MetaServiceCode::OK; -std::unique_ptr txn; Review Comment: it's in macro `RPC_PREPROCESS`, for defer catch it -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [enhance](meta-service)add bvar for ms kv read write count [doris]
gavinchou commented on code in PR #51708:
URL: https://github.com/apache/doris/pull/51708#discussion_r2148971899
##
cloud/src/meta-service/meta_service.cpp:
##
@@ -456,6 +465,10 @@ void internal_create_tablet(const CreateTabletsRequest*
request, MetaServiceCode
msg = "failed to init txn";
return;
}
+std::unique_ptr> defer_stats((int*)0x01,
[&](int*) {
+stats.read_counter << txn->num_get_keys();
+stats.write_counter << txn->num_del_keys() + txn->num_put_keys();
Review Comment:
do we need to separate delete and put?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
Re: [PR] [enhance](meta-service)add bvar for ms kv read write count [doris]
gavinchou commented on code in PR #51708: URL: https://github.com/apache/doris/pull/51708#discussion_r2148970449 ## cloud/src/meta-service/meta_service.cpp: ## @@ -250,7 +254,7 @@ void MetaServiceImpl::get_version(::google::protobuf::RpcController* controller, } code = MetaServiceCode::OK; -std::unique_ptr txn; Review Comment: why delete? is it a shadow variable? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] [enhance](meta-service)add bvar for ms kv read write count [doris]
hello-stephen commented on PR #51708: URL: https://github.com/apache/doris/pull/51708#issuecomment-2969897028 Thank you for your contribution to Apache Doris. Don't know what should be done next? See [How to process your PR](https://cwiki.apache.org/confluence/display/DORIS/How+to+process+your+PR). Please clearly describe your PR: 1. What problem was fixed (it's best to include specific error reporting information). How it was fixed. 2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be. 3. What features were added. Why was this function added? 4. Which code was refactored and why was this part of the code refactored? 5. Which functions were optimized and what is the difference before and after the optimization? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
