Poorvankbhatia commented on code in PR #26274:
URL: https://github.com/apache/flink/pull/26274#discussion_r1991890366


##########
flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/sink/writer/AsyncSinkWriter.java:
##########
@@ -101,19 +101,25 @@ public abstract class AsyncSinkWriter<InputT, 
RequestEntryT extends Serializable
 
     /**
      * Buffer to hold request entries that should be persisted into the 
destination, along with its
-     * size in bytes.
+     * total size in bytes.
      *
-     * <p>A request entry contain all relevant details to make a call to the 
destination. Eg, for
-     * Kinesis Data Streams a request entry contains the payload and partition 
key.
+     * <p>This buffer is managed using {@link BufferWrapper}, allowing sink 
implementations to
+     * define their own optimized buffering strategies. By default, {@link 
DequeBufferWrapper} is
+     * used.
      *
-     * <p>It seems more natural to buffer InputT, ie, the events that should 
be persisted, rather
-     * than RequestEntryT. However, in practice, the response of a failed 
request call can make it
-     * very hard, if not impossible, to reconstruct the original event. It is 
much easier, to just
-     * construct a new (retry) request entry from the response and add that 
back to the queue for
-     * later retry.
+     * <p>The buffer stores {@link RequestEntryWrapper} objects rather than 
raw {@link
+     * RequestEntryT} instances, as buffering wrapped entries allows for 
better tracking of size and
+     * metadata. This also makes it easier to handle retries by reinserting 
failed entries back into

Review Comment:
   Modified this.



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