Save a memcpy in the tlog peek path (#7328)
This commit is contained in:
parent
5a4082bfe8
commit
1f8fc32f41
|
@ -573,7 +573,9 @@ Future<Void> logRouterPeekMessages(PromiseType replyPromise,
|
|||
TLogPeekReply reply;
|
||||
reply.maxKnownVersion = self->version.get();
|
||||
reply.minKnownCommittedVersion = self->poppedVersion;
|
||||
reply.messages = StringRef(reply.arena, messages.toValue());
|
||||
auto messagesValue = messages.toValue();
|
||||
reply.arena.dependsOn(messagesValue.arena());
|
||||
reply.messages = messagesValue;
|
||||
reply.popped = self->minPopped.get() >= self->startVersion ? self->minPopped.get() : 0;
|
||||
reply.end = endVersion;
|
||||
reply.onlySpilled = false;
|
||||
|
|
|
@ -2020,7 +2020,9 @@ Future<Void> tLogPeekMessages(PromiseType replyPromise,
|
|||
TLogPeekReply reply;
|
||||
reply.maxKnownVersion = logData->version.get();
|
||||
reply.minKnownCommittedVersion = logData->minKnownCommittedVersion;
|
||||
reply.messages = StringRef(reply.arena, messages.toValue());
|
||||
auto messagesValue = messages.toValue();
|
||||
reply.arena.dependsOn(messagesValue.arena());
|
||||
reply.messages = messagesValue;
|
||||
reply.end = endVersion;
|
||||
reply.onlySpilled = onlySpilled;
|
||||
|
||||
|
|
Loading…
Reference in New Issue