Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2707#discussion_r86106408
  
    --- Diff: 
flink-streaming-connectors/flink-connector-cassandra/src/main/java/org/apache/flink/streaming/connectors/cassandra/CassandraCommitter.java
 ---
    @@ -118,16 +117,32 @@ public void close() throws Exception {
        }
     
        @Override
    -   public void commitCheckpoint(long checkpointID) {
    -           session.execute(updateStatement.bind(checkpointID));
    -           this.lastCommittedCheckpointID = checkpointID;
    +   public void commitCheckpoint(int subtaskIdx, long checkpointId) {
    +           String statement = String.format(
    +                   "UPDATE %s.%s set checkpoint_id=%d where sink_id='%s' 
and sub_id=%d;",
    +                   keySpace, table, checkpointId, operatorId, subtaskIdx);
    +
    +           session.execute(statement);
    --- End diff --
    
    You forgot to update the `lastCommittedCheckpointID` here. It will now only 
be updated once in `isCheckpointCommitted`.
    
    As a follow up the test for this behavior should be extended to cover more 
than 1 commit.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to