Tsz-wo Sze created RATIS-2144:
---------------------------------
Summary: 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
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)