sreejasahithi commented on code in PR #9655:
URL: https://github.com/apache/ozone/pull/9655#discussion_r2715574243
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java:
##########
@@ -1102,6 +1109,19 @@ ContainerCommandResponseProto handleWriteChunk(
return getWriteChunkResponseSuccess(request, blockDataProto);
}
+ /**
+ * Roll back usedSpace when write operation fails after writeChunk succeeded.
+ */
+ private void rollbackUsedSpaceOnWriteFailure(KeyValueContainer kvContainer,
boolean writeChunkSucceeded,
Review Comment:
When write succeeds, `incrWriteBytes()` decrements committedBytes (in
ContainerData.java), but rollback only restores usedSpace. Should
committedBytes also be rolled back to maintain consistency?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]