Alexey Serbin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/18090 )

Change subject: [consensus] reduce critical section in LogCache::ReadOps()
......................................................................


Patch Set 1:

(1 comment)

Thank you for taking a look!

http://gerrit.cloudera.org:8080/#/c/18090/1/src/kudu/consensus/log_cache.cc
File src/kudu/consensus/log_cache.cc:

http://gerrit.cloudera.org:8080/#/c/18090/1/src/kudu/consensus/log_cache.cc@348
PS1, Line 348: if (remaining_space < 0) {
> Don't we have to do the TotalByteSizeForMessage() subtraction before this?
Yup, that's the idea: once we do subtraction of the total message size below, 
we don't need to check for messages->empty() anymore given that the outer 
'while' cycle has (remaining_space > 0) as the part of the criterion.

And it might be possible to get more bytes there if that's the only message, 
yes (and it should be so -- otherwise this code could not be able to fetch even 
a single message and it would stall).



--
To view, visit http://gerrit.cloudera.org:8080/18090
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia7de32eb8adde242c8047720e062535cbdaf3e39
Gerrit-Change-Number: 18090
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Wed, 15 Dec 2021 00:14:15 +0000
Gerrit-HasComments: Yes

Reply via email to