fhan688 commented on code in PR #19692:
URL: https://github.com/apache/hudi/pull/19692#discussion_r3830304191


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/StreamWriteFunction.java:
##########
@@ -155,6 +154,12 @@ public class StreamWriteFunction extends 
AbstractStreamWriteFunction<HoodieFlink
   private transient NormalizedKeyComputer recordKeyComputer;
   private transient RecordComparator recordKeyComparator;
 
+  private enum BufferWriteResult {
+    SUCCESS,
+    BUFFER_CREATION_FAILED,
+    BUFFER_DIVERGED

Review Comment:
   > Or Can we avoid this enum? The two cases can be distinguished based on 
whether the current bucket is null, a creation failure leaves no current 
bucket, while a write failure leaves the current bucket to be flushed and 
disposed.
   
   Yes, the two failure cases can be distinguished this way. A buffer creation 
failure leaves no bucket in the map, while a write failure leaves the failed 
bucket in the map to be flushed and disposed. I’ll remove the enum and add a 
comment documenting this invariant.



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