vahmed-hamdy commented on a change in pull request #18945:
URL: https://github.com/apache/flink/pull/18945#discussion_r816870505
##########
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:
yes, for the current state `SinkWriterOperator` calls `prepareCommit`
for all `PrecommittingSinkWriter`s even the ones via a non
`TwoPhaseCommittingSink` Sinks. It is stated
[here](https://github.com/apache/flink/blob/dcd215620d96c5e648cea777f0b7594f7b5a1e26/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/sink/SinkWriterOperator.java#L178)
here that it is to keep a sink v1 topology behaviour.
It is called upon calling
[prepareSnapshotPreBarrier](https://github.com/apache/flink/blob/dcd215620d96c5e648cea777f0b7594f7b5a1e26/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/sink/SinkWriterOperator.java#L137)
which I understand is called directly before checkpointing.
--
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]