You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Ivan Andika (Jira)" <ji...@apache.org> on 2025/12/21 05:39:00 UTC
[jira] [Updated] (HDDS-14215) KeyValueStreamDataChannelBase#cleanupInternal should delete the block file
[ https://issues.apache.org/jira/browse/HDDS-14215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ivan Andika updated HDDS-14215:
-------------------------------
Description:
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 seem to have a way to continue writing to an incomplete stream, we should delete the file to prevent orphan block files.
was:
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.
> 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
> Priority: Major
>
> 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 seem 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: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org