iceberg icon indicating copy to clipboard operation
iceberg copied to clipboard

Flink: Fix flaky test in testTwoSinksInDisjointedDAG

Open Guosmilesmile opened this issue 6 months ago • 3 comments

In https://github.com/apache/iceberg/issues/13338 , I think the main reason here is that the table metadata has not been updated yet.

The leftTable.refresh() in the code can be called earlier, and a refresh for the rightTable should be added as well.

Guosmilesmile avatar Jun 18 '25 15:06 Guosmilesmile

@ajantha-bhat @pvary Please take a look if you have time. Thanks ! GuoYu

Guosmilesmile avatar Jun 18 '25 16:06 Guosmilesmile

The error message is Expecting empty but was: [Record(1, left-aaa)...

So we are in this code:

    if (snapshot == null) {
      assertThat(expected).isEmpty();
      return;
    }

So I would guess, that somehow the Job execution is finished, but notifyCheckpoint is not called, and the target table is not changed. But this is just a guess

pvary avatar Jun 19 '25 17:06 pvary

We might have to change the test setup to checkpoint explicitly, then tear down the Flink cluster.

mxm avatar Jun 20 '25 08:06 mxm

Hi @Guosmilesmile Thanks for reporting this issue. I have a couple question/comments:

  1. How "flaky" is this unit test? is it flaky in a particular Flink Version? Have you been able to make it fail on IntelliJ? or does it happen usually in the CI ?
  2. I see you're suggesting changes in the 2 implementation of the testTwoSinksInDisjointedDAG (one for FlinkSink, another for IcebergSink). Did you experience the flakiness in both implementation or only in one? From the GitHub Issue, I can see you were pointing to the IcebergSink version.

rodmeneses avatar Jun 23 '25 19:06 rodmeneses

This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the [email protected] list. Thank you for your contributions.

github-actions[bot] avatar Jul 24 '25 00:07 github-actions[bot]

This pull request has been closed due to lack of activity. This is not a judgement on the merit of the PR in any way. It is just a way of keeping the PR queue manageable. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.

github-actions[bot] avatar Aug 01 '25 00:08 github-actions[bot]