You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/09/27 07:10:18 UTC
[GitHub] [flink] AHeise commented on a change in pull request #17351: [FLINK-24371][datastream] Call preCommit on SinkWriter although no committer is available
AHeise commented on a change in pull request #17351:
URL: https://github.com/apache/flink/pull/17351#discussion_r716388837
##########
File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/sink/NoopCommitterHandler.java
##########
@@ -34,7 +34,8 @@
@Override
public List<Object> processCommittables(
- SupplierWithException<List<Object>, Exception> committableSupplier) {
+ SupplierWithException<List<Object>, Exception> committableSupplier) throws Exception {
+ committableSupplier.get();
Review comment:
If we always want to `preCommit`, then please refactor such that `preCommit` is called on call-site (e.g. remove the `Supplier` and directly pass the result.
##########
File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/sink/NoopCommitterHandler.java
##########
@@ -34,7 +34,8 @@
@Override
public List<Object> processCommittables(
- SupplierWithException<List<Object>, Exception> committableSupplier) {
+ SupplierWithException<List<Object>, Exception> committableSupplier) throws Exception {
+ committableSupplier.get();
Review comment:
Why is this needed, what's not working in this way? It feels counter-intuitive to have `preCommit` without `commit`. It seems like I missed a case when I explicitly structured the code to not call `preCommit`.
--
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-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org