[
https://issues.apache.org/jira/browse/RATIS-2144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tsz-wo Sze resolved RATIS-2144.
-------------------------------
Fix Version/s: 3.2.0
Assignee: Xinyu Tan
Resolution: Fixed
The pull request is now merged. [~tanxinyu], thanks for the quick fix!
> SegmentedRaftLogWorker should close the stream before releasing the buffer.
> ---------------------------------------------------------------------------
>
> Key: RATIS-2144
> URL: https://issues.apache.org/jira/browse/RATIS-2144
> Project: Ratis
> Issue Type: Bug
> Components: server
> Reporter: Tsz-wo Sze
> Assignee: Xinyu Tan
> Priority: Major
> Fix For: 3.2.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> In the code below, frees the buffer first and cleans up out. The buffer
> content can be corrupted and then be flushed to out.
> {code}
> //SegmentedRaftLogWorker
> void close() {
> ...
> PlatformDependent.freeDirectBuffer(writeBuffer);
> IOUtils.cleanup(LOG, out);
> LOG.info("{} close()", name);
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)