xy2953396112 commented on code in PR #3547:
URL: https://github.com/apache/celeborn/pull/3547#discussion_r2596171629
##########
worker/src/main/scala/org/apache/celeborn/service/deploy/worker/storage/TierWriter.scala:
##########
@@ -341,8 +341,18 @@ class MemoryTierWriter(
}
override def closeStreams(): Unit = {
- flushBuffer.consolidate()
- fileInfo.setBuffer(flushBuffer)
+ try {
+ flushBuffer.consolidate()
Review Comment:
Even if the `consolidate()` method fails, the `flushBuffer` object itself
remains valid.When `CompositeByteBuf ` encounters an `OutOfMemoryError`, it
will not be corrupted; only the memory `consolidation operation` fails to
complete. Thus, although the `consolidate()` operation itself fails, the data
integrity of flushBuffer is guaranteed, and it can be safely used continuously.
--
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]