Adar Dembo has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/14767 )

Change subject: log: refactor close and replace last segment
......................................................................

log: refactor close and replace last segment

Log::Close and SegmentAllocator::RollOver both tried to do the same thing,
except Log::Close didn't actually need to replace the last segment, nor did
it need to close the current segment with state_lock_ held.

I also snuck in a small fix to LogIndex::IndexChunk::Open's use of
ftruncate, and a visibility fix to a SegmentAllocator member.

Change-Id: I871b43514cbafe9a9b594a551fe653d766298123
Reviewed-on: http://gerrit.cloudera.org:8080/14767
Tested-by: Adar Dembo <[email protected]>
Reviewed-by: Andrew Wong <[email protected]>
---
M src/kudu/consensus/log.cc
M src/kudu/consensus/log.h
M src/kudu/consensus/log_index.cc
3 files changed, 56 insertions(+), 39 deletions(-)

Approvals:
  Adar Dembo: Verified
  Andrew Wong: Looks good to me, approved

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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I871b43514cbafe9a9b594a551fe653d766298123
Gerrit-Change-Number: 14767
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)

Reply via email to