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/09/22 02:11:49 UTC

[GitHub] [incubator-pegasus] hycdong commented on a change in pull request #605: feat(hotspot): add a function to start hotkey detecting in shell commands

hycdong commented on a change in pull request #605:
URL: https://github.com/apache/incubator-pegasus/pull/605#discussion_r492439986



##########
File path: src/include/rrdb/rrdb.code.definition.h
##########
@@ -18,5 +18,6 @@ DEFINE_STORAGE_READ_RPC_CODE(RPC_RRDB_RRDB_TTL)
 DEFINE_STORAGE_READ_RPC_CODE(RPC_RRDB_RRDB_GET_SCANNER)
 DEFINE_STORAGE_READ_RPC_CODE(RPC_RRDB_RRDB_SCAN)
 DEFINE_STORAGE_READ_RPC_CODE(RPC_RRDB_RRDB_CLEAR_SCANNER)
+DEFINE_STORAGE_READ_RPC_CODE(RPC_DETECT_HOTKEY)

Review comment:
       `DEFINE_STORAGE_READ_RPC_CODE` will define a rpc code whose action is read data from storage, start or stop detecting hotkey is not this rpc, it should not be defined here.

##########
File path: src/include/rrdb/rrdb.client.h
##########
@@ -417,6 +417,17 @@ class rrdb_client
         return rpc.call(_resolver, tracker, std::forward<TCallback &&>(callback));
     }
 
+    // ---------- call RPC_DETECT_HOTKEY ------------
+    // - synchronous
+    std::pair<::dsn::error_code, hotkey_detect_response>
+    detect_hotkey_sync(const hotkey_detect_request &args,
+                       std::chrono::milliseconds timeout,
+                       uint64_t partition_hash)
+    {
+        return ::dsn::rpc::wait_and_unwrap<hotkey_detect_response>(_resolver->call_op(
+            RPC_DETECT_HOTKEY, args, &_tracker, empty_rpc_handler, timeout, partition_hash));

Review comment:
       RPC_DETECT_HOTKEY should not be a rrdb task code, see comments in `rrdb.code.definition.h`




----------------------------------------------------------------
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