Shuo-Jia commented on a change in pull request #897:
URL: https://github.com/apache/incubator-pegasus/pull/897#discussion_r805470044
##########
File path: src/server/capacity_unit_calculator.cpp
##########
@@ -175,6 +179,27 @@ void
capacity_unit_calculator::add_multi_get_cu(dsn::message_ex *req,
_read_hotkey_collector->capture_hash_key(hash_key, key_count);
}
+void capacity_unit_calculator::add_batch_get_cu(dsn::message_ex *req,
+ int32_t status,
+ const
std::vector<::dsn::apps::full_data> &datas)
+{
+ int64_t data_size = 0;
+ for (const auto &data : datas) {
+ data_size += data.hash_key.size() + data.sort_key.size() +
data.value.size();
+ _read_hotkey_collector->capture_hash_key(data.hash_key, 1);
+ }
+
+ _pfc_batch_get_bytes->add(data_size);
+ add_backup_request_bytes(req, data_size);
+
+ if (status != rocksdb::Status::kOk && status != rocksdb::Status::kNotFound
&&
+ status != rocksdb::Status::kIncomplete && status !=
rocksdb::Status::kInvalidArgument) {
+ return;
Review comment:
This billing standard is consistent with the public cloud and does not
need to be increased by 1
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]