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

SegmentedRaftLogWorker should close the stream before releasing the buffer.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.1.1, 3.2.0
    • server
    • None

    Description

      In the code below, frees the buffer first and cleans up out. The buffer content can be corrupted and then be flushed to out.

      //SegmentedRaftLogWorker
        void close() {
          ...
          PlatformDependent.freeDirectBuffer(writeBuffer);
          IOUtils.cleanup(LOG, out);
          LOG.info("{} close()", name);
        }
      

      Attachments

        Issue Links

          Activity

            People

              tanxinyu Xinyu Tan
              szetszwo Tsz-wo Sze
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h