acelyc111 commented on code in PR #1908:
URL:
https://github.com/apache/incubator-pegasus/pull/1908#discussion_r1522682770
##########
src/server/pegasus_mutation_duplicator.cpp:
##########
@@ -205,6 +230,75 @@ void
pegasus_mutation_duplicator::on_duplicate_reply(uint64_t hash,
}
}
+void
pegasus_mutation_duplicator::type_force_send_no_idempotent_if_need(duplicate_rpc
&rpc)
+{
+
+ // there maybe more than one mutation in one dup rpc
+ if (FLAGS_force_send_no_idempotent_when_duplication) {
+ for (auto entry : rpc.request().entries) {
+ if (entry.task_code == dsn::apps::RPC_RRDB_RRDB_INCR ||
+ entry.task_code == dsn::apps::RPC_RRDB_RRDB_CHECK_AND_SET ||
+ entry.task_code == dsn::apps::RPC_RRDB_RRDB_CHECK_AND_MUTATE) {
+
+ METRIC_VAR_INCREMENT(dup_retry_no_idempotent_duplicate_qps);
+
+ dsn::message_ex *write =
+ dsn::from_blob_to_received_msg(entry.task_code,
entry.raw_message);
+
+ if (entry.task_code == dsn::apps::RPC_RRDB_RRDB_INCR) {
+ incr_rpc raw_rpc(write);
+ absl::string_view
unmarshall_key(raw_rpc.request().key.data(),
Review Comment:
Is there any difference? the operator<</to_string()/to_string_view() member
function of blob are using data() and length() to create a string/string_view
object too.
--
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]