Ivan Andika created HDDS-14215:
----------------------------------
Summary: KeyValueStreamDataChannelBase#cleanupInternal should
delete the block file
Key: HDDS-14215
URL: https://issues.apache.org/jira/browse/HDDS-14215
Project: Apache Ozone
Issue Type: Sub-task
Reporter: Ivan Andika
Assignee: Ivan Andika
See the comment in StreamDataChannelBase#cleanUp
{code:java}
public boolean cleanUp() {
if (linked.get()) {
// already linked, nothing to do.
return true;
}
if (cleaned.compareAndSet(false, true)) {
// close and then delete the file.
try {
cleanupInternal();
} catch (IOException e) {
LOG.warn("Failed to close " + this, e);
}
}
return false;
} {code}
In Ratis, DataStream#cleanUp is called when there is an exception or when a
client is inactive. Since currently, we don't see to have a way to continue
writing to an incomplete stream, we should delete the file to prevent orphan
block files.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]