mxm commented on code in PR #12745:
URL: https://github.com/apache/iceberg/pull/12745#discussion_r2034870281
##########
flink/v1.19/flink/src/test/java/org/apache/iceberg/flink/sink/TestIcebergCommitter.java:
##########
@@ -706,51 +706,6 @@ public void
testRecoveryFromSnapshotWithoutCompletedNotification() throws Except
SimpleDataUtil.assertTableRows(table, expectedRows, branch);
assertSnapshotSize(1);
-
- assertMaxCommittedCheckpointId(jobId, operatorId.toString(), 0);
-
- RowData row = SimpleDataUtil.createRowData(2, "world");
- expectedRows.add(row);
- DataFile dataFile = writeDataFile("data-2", ImmutableList.of(row));
- processElement(jobId, checkpointId, harness, 1, operatorId.toString(),
dataFile);
-
- snapshot = harness.snapshot(++checkpointId, ++timestamp);
- assertFlinkManifests(0);
- }
-
- // Redeploying flink job from external checkpoint.
- JobID newJobId = new JobID();
- try (OneInputStreamOperatorTestHarness<
- CommittableMessage<IcebergCommittable>,
CommittableMessage<IcebergCommittable>>
- harness = getTestHarness()) {
- harness.getStreamConfig().setOperatorID(operatorId);
- harness.initializeState(snapshot);
Review Comment:
I think there could be a misunderstanding here: In the first part (see
https://github.com/apache/iceberg/pull/12745#discussion_r2032610009) we
complete the checkpoint without calling notifyCheckpointComplete. Then, we
restore the state and test that the checkpoint is finalized correctly (see
https://github.com/apache/iceberg/pull/12745#discussion_r2032614250).
The way I understand the test is that we can restore a snapshot and properly
finalize it when notifyCheckpointComplete is called. The test name is still
valid because we don't call notifyCheckpointComplete when we first create the
snapshot, only after restoring the snapshot.
We are not trying to test whether Flink calls notifyCheckpointComplete, but
we are testing that the restore behaves correctly. NotifyCheckpointComplete is
part of the restore, even if the test harness doesn't call it due to its
limitations.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]