tsreaper commented on a change in pull request #23:
URL: https://github.com/apache/flink-table-store/pull/23#discussion_r813497170



##########
File path: 
flink-table-store-connector/src/main/java/org/apache/flink/table/store/connector/sink/global/GlobalCommitterOperator.java
##########
@@ -103,18 +115,20 @@ public void snapshotState(StateSnapshotContext context) 
throws Exception {
         if (committables.size() > 0) {
             committablesPerCheckpoint.put(
                     context.getCheckpointId(),
-                    globalCommitter.combine(context.getCheckpointId(), 
committables));
+                    committer.combine(context.getCheckpointId(), 
committables));
         }
         streamingCommitterState.update(new 
ArrayList<>(committablesPerCheckpoint.values()));
     }
 
     @Override
     public void endInput() throws Exception {
-        List<CommT> allCommittables = pollCommittables();
-        if (!allCommittables.isEmpty()) {
-            globalCommitter.commit(
-                    Collections.singletonList(
-                            globalCommitter.combine(Long.MAX_VALUE, 
allCommittables)));
+        if (isBounded) {
+            List<CommT> allCommittables = pollCommittables();
+            if (!allCommittables.isEmpty()) {
+                committer.commit(
+                        Collections.singletonList(
+                                committer.combine(Long.MAX_VALUE, 
allCommittables)));
+            }

Review comment:
       Not exactly. We should also consider the case when checkpointing is not 
enabled for a streaming job. Actually FLINK-25941 also states this (and also 
affects the compilation of this module). Please take a look.




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