Uploaded image for project: 'Ratis'
  1. Ratis
  2. RATIS-587

FinalizeLogSegment should flush the contents of log

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.4.0
    • server
    • None

    Description

      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.

      Attachments

        1. r587_20190614.patch
          6 kB
          Tsz-wo Sze
        2. r587_20190613b.patch
          6 kB
          Tsz-wo Sze
        3. r587_20190613.patch
          2 kB
          Tsz-wo Sze

        Issue Links

          Activity

            People

              szetszwo Tsz-wo Sze
              sdeka Supratim Deka
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: