neverchanje commented on a change in pull request #631: URL: https://github.com/apache/incubator-pegasus/pull/631#discussion_r517810959
########## File path: src/server/hotkey_collector.h ########## @@ -115,6 +117,7 @@ class hotkey_empty_data_collector : public internal_collector_base class hotkey_coarse_data_collector : public internal_collector_base { public: + hotkey_coarse_data_collector() = delete; Review comment: Move deleted constructor to private. ########## File path: src/server/hotkey_collector.cpp ########## @@ -21,26 +21,30 @@ #include <dsn/utility/smart_pointers.h> #include <dsn/utility/flags.h> #include <boost/functional/hash.hpp> -#include "base/pegasus_key_schema.h" #include <dsn/dist/fmt_logging.h> #include <dsn/utility/flags.h> +#include <dsn/tool-api/task.h> +#include <dsn/dist/replication/replication.codes.h> +#include "base/pegasus_key_schema.h" namespace pegasus { namespace server { -DSN_DEFINE_int32("pegasus.server", - coarse_data_variance_threshold, - 3, - "the threshold of variance calculate to find the outliers"); +DSN_DEFINE_uint32("pegasus.server", + coarse_data_variance_threshold, + 3, + "the threshold of variance calculate to find the outliers in coarse analyse"); -DSN_DEFINE_validator(coarse_data_variance_threshold, - [](int32_t threshold) -> bool { return (threshold >= 0); }); +DSN_DEFINE_uint32("pegasus.server", + fine_data_variance_threshold, + 3, + "the threshold of variance calculate to find the outliers in fine analyse"); // TODO: (Tangyanzhao) add a limit to avoid changing when detecting -DSN_DEFINE_int32("pegasus.server", - data_capture_hash_bucket_num, - 37, - "the number of data capture hash buckets"); +DSN_DEFINE_uint32("pegasus.server", + data_capture_hash_bucket_num, Review comment: ```suggestion hotkey_buckets_num, ``` ########## File path: src/server/hotkey_collector.h ########## @@ -123,5 +126,22 @@ class hotkey_coarse_data_collector : public internal_collector_base std::vector<std::atomic<uint64_t>> _hash_buckets; }; +class hotkey_fine_data_collector : public internal_collector_base +{ +public: + hotkey_fine_data_collector() = delete; Review comment: ```suggestion hotkey_fine_data_collector() = delete; ``` move deleted to private ########## File path: src/server/hotkey_collector.cpp ########## @@ -21,26 +21,30 @@ #include <dsn/utility/smart_pointers.h> #include <dsn/utility/flags.h> #include <boost/functional/hash.hpp> -#include "base/pegasus_key_schema.h" #include <dsn/dist/fmt_logging.h> #include <dsn/utility/flags.h> +#include <dsn/tool-api/task.h> +#include <dsn/dist/replication/replication.codes.h> +#include "base/pegasus_key_schema.h" namespace pegasus { namespace server { -DSN_DEFINE_int32("pegasus.server", - coarse_data_variance_threshold, - 3, - "the threshold of variance calculate to find the outliers"); +DSN_DEFINE_uint32("pegasus.server", + coarse_data_variance_threshold, + 3, + "the threshold of variance calculate to find the outliers in coarse analyse"); Review comment: ```suggestion DSN_DEFINE_uint32("pegasus.server", hot_bucket_variance_threshold, 3, "the variance threshold to detect hot bucket during coarse analysis of hotkey detection"); ``` ########## File path: src/server/hotkey_collector.cpp ########## @@ -21,26 +21,30 @@ #include <dsn/utility/smart_pointers.h> #include <dsn/utility/flags.h> #include <boost/functional/hash.hpp> -#include "base/pegasus_key_schema.h" #include <dsn/dist/fmt_logging.h> #include <dsn/utility/flags.h> +#include <dsn/tool-api/task.h> +#include <dsn/dist/replication/replication.codes.h> +#include "base/pegasus_key_schema.h" namespace pegasus { namespace server { -DSN_DEFINE_int32("pegasus.server", - coarse_data_variance_threshold, - 3, - "the threshold of variance calculate to find the outliers"); +DSN_DEFINE_uint32("pegasus.server", + coarse_data_variance_threshold, + 3, + "the threshold of variance calculate to find the outliers in coarse analyse"); -DSN_DEFINE_validator(coarse_data_variance_threshold, - [](int32_t threshold) -> bool { return (threshold >= 0); }); +DSN_DEFINE_uint32("pegasus.server", + fine_data_variance_threshold, + 3, + "the threshold of variance calculate to find the outliers in fine analyse"); Review comment: ```suggestion DSN_DEFINE_uint32("pegasus.server", hot_key_variance_threshold, 3, "the variance threshold to detect hot key during fine analysis of hotkey detection"); ``` ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pegasus.apache.org For additional commands, e-mail: dev-h...@pegasus.apache.org