vahmed-hamdy commented on a change in pull request #18945:
URL: https://github.com/apache/flink/pull/18945#discussion_r816889853



##########
File path: 
flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/sink/writer/AsyncSinkWriter.java
##########
@@ -51,7 +52,8 @@
  */
 @PublicEvolving
 public abstract class AsyncSinkWriter<InputT, RequestEntryT extends 
Serializable>
-        implements StatefulSink.StatefulSinkWriter<InputT, 
BufferedRequestState<RequestEntryT>> {
+        implements StatefulSink.StatefulSinkWriter<InputT, 
BufferedRequestState<RequestEntryT>>,
+                TwoPhaseCommittingSink.PrecommittingSinkWriter<InputT, Void> {

Review comment:
       After a second look.
   I believe this issue should be resolved, as per this 
[line](https://github.com/apache/flink/blob/dcd215620d96c5e648cea777f0b7594f7b5a1e26/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/sink/SinkWriterOperator.java#L147)
   the `flush` method is used to notify the writer with the upcoming snapshot.
   
   It appears that the `prepareCommit` interface is only used in 2PC cases and 
for operators that would separate building the immutable state object and 
returning it in `snapshotState`. Since `AsyncSinkWriter` creates the state 
object on returning it, I think this PR is not needed.




-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to