acelyc111 commented on code in PR #2088:
URL:
https://github.com/apache/incubator-pegasus/pull/2088#discussion_r1711274616
##########
src/replica/duplication/mutation_batch.cpp:
##########
@@ -196,10 +196,10 @@ void mutation_batch::add_mutation_if_valid(mutation_ptr
&mu, decree start_decree
}
blob bb;
- if (update.data.buffer() != nullptr) {
+ if (update.data.buffer()) {
+ // ATTENTION: instead of copy, move could optimize the
performance. However, this
+ // would nullify the elements of mu->data.updates.
bb = std::move(update.data);
- } else {
- bb = blob::create_from_bytes(update.data.data(),
update.data.length());
}
Review Comment:
While it's possible the `_holder` is nullptr and `_data` has a valid data
pointer, so it's needed to process the latter case.
--
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]