TheodoreLx commented on code in PR #3547:
URL: https://github.com/apache/celeborn/pull/3547#discussion_r2597849868


##########
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:
   An OutOfMemoryError exception only occurs when the `allocBuffer` method is 
called in `CompositeByteBuf#consolidate0`. Before this, the internal data 
structure of `CompositeByteBuf` has not been modified, so even if `consolidate` 
throws an exception, the original buffer can still be used.



-- 
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]

Reply via email to