levy5307 commented on a change in pull request #603:
URL: https://github.com/apache/incubator-pegasus/pull/603#discussion_r502213976
##########
File path: src/server/capacity_unit_calculator.cpp
##########
@@ -3,13 +3,21 @@
// can be found in the LICENSE file in the root directory of this source tree.
#include "capacity_unit_calculator.h"
+
#include <dsn/utility/config_api.h>
#include <rocksdb/status.h>
+#include "hotkey_collector.h"
namespace pegasus {
namespace server {
-capacity_unit_calculator::capacity_unit_calculator(replica_base *r) :
replica_base(r)
+capacity_unit_calculator::capacity_unit_calculator(
+ replica_base *r,
+ std::shared_ptr<hotkey_collector> read_hotkey_collector,
+ std::shared_ptr<hotkey_collector> write_hotkey_collector)
+ : replica_base(r),
+ _read_hotkey_collector(read_hotkey_collector),
+ _write_hotkey_collector(write_hotkey_collector)
Review comment:
I think you can add assert to ensure `_read_hotkey_collector` and
`_write_hotkey_collector` != nullptr
##########
File path: src/server/capacity_unit_calculator.cpp
##########
@@ -3,13 +3,21 @@
// can be found in the LICENSE file in the root directory of this source tree.
#include "capacity_unit_calculator.h"
+
#include <dsn/utility/config_api.h>
#include <rocksdb/status.h>
+#include "hotkey_collector.h"
namespace pegasus {
namespace server {
-capacity_unit_calculator::capacity_unit_calculator(replica_base *r) :
replica_base(r)
+capacity_unit_calculator::capacity_unit_calculator(
+ replica_base *r,
+ std::shared_ptr<hotkey_collector> read_hotkey_collector,
+ std::shared_ptr<hotkey_collector> write_hotkey_collector)
+ : replica_base(r),
+ _read_hotkey_collector(read_hotkey_collector),
+ _write_hotkey_collector(write_hotkey_collector)
Review comment:
I think you can add a assert to ensure `_read_hotkey_collector` and
`_write_hotkey_collector` != nullptr
----------------------------------------------------------------
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]