You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Sergey Nuyanzin (Jira)" <ji...@apache.org> on 2026/05/22 13:35:00 UTC

[jira] [Resolved] (FLINK-39729) CorrelateRestoreTest.testRestore[8] (CORRELATE_WITH_LITERAL_AGG) is flaky due to non-deterministic changelog ordering

     [ https://issues.apache.org/jira/browse/FLINK-39729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergey Nuyanzin resolved FLINK-39729.
-------------------------------------
    Fix Version/s: 2.4.0
       Resolution: Fixed

> CorrelateRestoreTest.testRestore[8] (CORRELATE_WITH_LITERAL_AGG) is flaky due to non-deterministic changelog ordering
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-39729
>                 URL: https://issues.apache.org/jira/browse/FLINK-39729
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Planner
>            Reporter: Jim Hughes
>            Assignee: Jim Hughes
>            Priority: Minor
>              Labels: pull-request-available, test-stability
>             Fix For: 2.4.0
>
>
> `CorrelateRestoreTest.testRestore[8]` (`CORRELATE_WITH_LITERAL_AGG`) is intermittently failing because the test asserts exact changelog record ordering, but the multi-source streaming plan produces non-deterministic record interleaving after restore.
> The plan has three independent sources feeding into two streaming joins (InnerJoin, LeftOuterJoin, SemiJoin). Post-restore, when `source_t2`'s record reaches the SemiJoin before the retract cascade from the GroupAggregate+InnerJoin pipeline completes, the `-D[3]` and `+I[3]` changelog records are never emitted in the expected window.
> The test was introduced in FLINK-37882.
> {code}
> Expecting actual:
>   ["+I[2]", "-D[2]", "+I[2]", "+I[3]"]
> to contain exactly in any order:
>   ["+I[2]", "+I[3]", "-D[2]", "-D[3]", "+I[2]", "+I[3]"]
> but could not find the following elements:
>   ["-D[3]", "+I[3]"]
> {code}
> *Fix:* Switch from changelog assertion to materialized data assertion using the existing `testMaterializedData()` + `consumedValues()` pattern (already used by `MultiJoinTestPrograms` and `DeltaJoinTestPrograms` for the same class of non-determinism). The expected materialized state is `[+I[2], +I[3]]`.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)