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



##########
File path: src/server/capacity_unit_calculator.cpp
##########
@@ -122,21 +134,25 @@ void capacity_unit_calculator::add_multi_get_cu(int32_t 
status,
     }
 
     if (status == rocksdb::Status::kNotFound) {
+        _read_hotkey_collector->capture_hash_key(hash_key, 1);

Review comment:
       I notice that you try to capture not-found key for multi_get, but not 
for single get, could you please explain why you design it?

##########
File path: src/server/capacity_unit_calculator.h
##########
@@ -11,16 +11,22 @@
 namespace pegasus {
 namespace server {
 
+class hotkey_collector;
+
 class capacity_unit_calculator : public dsn::replication::replica_base
 {
 public:
-    explicit capacity_unit_calculator(replica_base *r);
+    capacity_unit_calculator(replica_base *r,
+                             std::shared_ptr<hotkey_collector> 
read_hotkey_collector,
+                             std::shared_ptr<hotkey_collector> 
write_hotkey_collector);
 
     void add_get_cu(int32_t status, const dsn::blob &key, const dsn::blob 
&value);
     void add_multi_get_cu(int32_t status,
                           const dsn::blob &hash_key,
                           const std::vector<::dsn::apps::key_value> &kvs);
-    void add_scan_cu(int32_t status, const std::vector<::dsn::apps::key_value> 
&kvs);
+    void add_scan_cu(int32_t status,
+                     const std::vector<::dsn::apps::key_value> &kvs,
+                     const dsn::blob &hash_key_filter_pattern = dsn::blob());

Review comment:
       What the usage of `hash_key_filter_pattern`?




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to