[ 
https://issues.apache.org/jira/browse/RATIS-587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16865857#comment-16865857
 ] 

Tsz Wo Nicholas Sze commented on RATIS-587:
-------------------------------------------

[~sdeka], thanks for filing this bug and reviewing the patches.

I have committed this.

> FinalizeLogSegment should flush the contents of log
> ---------------------------------------------------
>
>                 Key: RATIS-587
>                 URL: https://issues.apache.org/jira/browse/RATIS-587
>             Project: Ratis
>          Issue Type: Bug
>          Components: server
>            Reporter: Supratim Deka
>            Assignee: Tsz Wo Nicholas Sze
>            Priority: Major
>         Attachments: r587_20190613.patch, r587_20190613b.patch, 
> r587_20190614.patch
>
>
> SegmentedRaftLog uses a BufferedWriteChannel for writing the log.
> FinalizeLogSegment task is enqueued when a segment fills up. This task closes 
> the channel and does cleanup.
> SegmentedRaftLogOutputStream.close() internally invokes 
> BufferedWriteChannel.flush(false)
> the false passed to flush indicates not to flush the buffer cache.
> This means that the contents of the log file are not persisted on disk. An 
> abrupt power failure could result in loss of committed log entries. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to