You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pegasus.apache.org by GitBox <gi...@apache.org> on 2020/10/15 10:42:22 UTC
[GitHub] [incubator-pegasus] hycdong commented on a change in pull request #618: feat(hotkey): capture data part1 - declare internal collector
hycdong commented on a change in pull request #618:
URL: https://github.com/apache/incubator-pegasus/pull/618#discussion_r505439935
##########
File path: src/server/pegasus_server_impl.cpp
##########
@@ -1490,6 +1496,16 @@ ::dsn::error_code pegasus_server_impl::start(int argc, char **argv)
this, _read_hotkey_collector, _write_hotkey_collector);
_server_write = dsn::make_unique<pegasus_server_write>(this, _verbose_log);
+ ::dsn::tasking::enqueue_timer(LPC_ANALYZE_HOTKEY,
Review comment:
Where is the definition of `LPC_ANALYZE_HOTKEY`?
##########
File path: src/server/hotkey_collector.cpp
##########
@@ -28,10 +36,18 @@ void hotkey_collector::handle_rpc(const dsn::replication::detect_hotkey_request
void hotkey_collector::capture_raw_key(const dsn::blob &raw_key, int64_t weight)
{
- // TODO: (Tangyanzhao) Add a judgment sentence to check if it is a raw key
+ dsn::blob hash_key, sort_key;
+ pegasus_restore_key(raw_key, hash_key, sort_key);
+ capture_hash_key(hash_key, weight);
+}
+
+void hotkey_collector::capture_hash_key(const dsn::blob &hash_key, int64_t weight)
+{
+ // TODO: (Tangyanzhao) add a unit test to ensure data integrity
Review comment:
What is the data integrity to be tested? and how about add the unit test in the pull request?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org