Adar Dembo has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/14931 )

Change subject: log: use RWFile in log segments
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/14931/2/src/kudu/consensus/log.cc
File src/kudu/consensus/log.cc:

http://gerrit.cloudera.org:8080/#/c/14931/2/src/kudu/consensus/log.cc@549
PS2, Line 549: // Normally, a segment is only finished when it becomes full. 
However, in some
             :   // cases (e.g. Log::Close) we may finish a segment that isn't 
full. In such
             :   // cases, let's return the excess preallocated space back to 
the filesystem by
             :   // truncating off the unused end of the segment.
> nit: this explains that we're truncating, but not why we're truncating cond
Well, it hints at how preallocation is related (i.e. to return excess 
preallocated space): if there's no preallocation, there's no preallocated space 
to speak of.

As for segment size, isn't it self-evident that if we've exceeded 
max_segment_size_ (which is the amount we've preallocated), there's no excess 
preallocation space to speak of, and thus nothing to truncate?

I'll try to work that into the comment I guess.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I65b39e219e76876df16e698211eb558ab31329c8
Gerrit-Change-Number: 14931
Gerrit-PatchSet: 2
Gerrit-Owner: Adar Dembo <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Thu, 19 Dec 2019 22:15:34 +0000
Gerrit-HasComments: Yes

Reply via email to