-
Notifications
You must be signed in to change notification settings - Fork 389
[Store] Add master side QP calculation #742
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -491,13 +491,19 @@ tl::expected<std::string, ErrorCode> WrappedMasterService::GetFsdir() { | |
} | ||
|
||
tl::expected<PingResponse, ErrorCode> WrappedMasterService::Ping( | ||
const UUID& client_id) { | ||
const UUID& client_id, size_t qp_count) { | ||
ScopedVLogTimer timer(1, "Ping"); | ||
timer.LogRequest("client_id=", client_id); | ||
|
||
MasterMetricManager::instance().inc_ping_requests(); | ||
|
||
auto result = master_service_.Ping(client_id); | ||
auto result = master_service_.Ping(client_id, 0); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it looks like qp_count should be passed in as a parameter here? |
||
|
||
if (result.has_value()) { | ||
// Increment cluster total QP number based on client's reported QP count | ||
MasterMetricManager::instance().inc_cluster_total_qp_num( | ||
result.value().total_qp_num); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The current implementation increments QP count on every ping operation which may cause inaccurate counting, so maybe we should maintain a map<uuid, qpcount> in master_metrics to update each client's status during pings and sum all qpcounts when queried. |
||
|
||
timer.LogResponseExpected(result); | ||
return result; | ||
|
@@ -543,4 +549,4 @@ void RegisterRpcService( | |
&wrapped_master_service); | ||
} | ||
|
||
} // namespace mooncake | ||
} // namespace mooncake |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like qp_count should be passed in as a parameter here?