Skip to content

[DNM][HUDI-9197] Fix flaky test for flink: testDynamicPartitionPrune#12995

Closed
cshuo wants to merge 2 commits intoapache:masterfrom
cshuo:HUDI-9197
Closed

[DNM][HUDI-9197] Fix flaky test for flink: testDynamicPartitionPrune#12995
cshuo wants to merge 2 commits intoapache:masterfrom
cshuo:HUDI-9197

Conversation

@cshuo
Copy link
Collaborator

@cshuo cshuo commented Mar 19, 2025

Change Logs

When read.streaming.enabled is enabled, flink incremental reading will continue running indefinitely until explicitly cancelled, and for IT test, we use sleep() to make sure expected data are read, but sometimes it's possible the program cannot finish reading data in the sleep interval. The fix here is an hotfix by increasing the sleep interval for the flaky test,
and we may need more comprehensive solution to test the indefinitely incremental reading.

Impact

none

Risk level (write none, low medium or high below)

low

Documentation Update

Describe any necessary documentation update if there is any new feature, config, or user-facing change. If not, put "none".

  • The config description must be updated if new configs are added or the default value of the configs are changed
  • Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the
    ticket number here and follow the instruction to make
    changes to the website.

Contributor's checklist

  • Read through contributor's guide
  • Change Logs and Impact were stated clearly
  • Adequate tests were added if applicable
  • CI passed

@github-actions github-actions bot added the size:XS PR with lines of changes in <= 10 label Mar 19, 2025
@cshuo
Copy link
Collaborator Author

cshuo commented Mar 19, 2025

cc @danny0405

@cshuo cshuo changed the title [HUDI-9197] Fix flaky test for flink: testDynamicPartitionPrune [DNM][HUDI-9197] Fix flaky test for flink: testDynamicPartitionPrune Mar 19, 2025
@github-actions github-actions bot added size:XL PR with lines of changes > 1000 and removed size:XS PR with lines of changes in <= 10 labels Mar 19, 2025
@cshuo
Copy link
Collaborator Author

cshuo commented Mar 19, 2025

@hudi-bot run azure

@github-actions github-actions bot added size:XS PR with lines of changes in <= 10 and removed size:XL PR with lines of changes > 1000 labels Mar 19, 2025
@hudi-bot
Copy link
Collaborator

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

TestData.writeData(TestData.DATA_SET_INSERT_SEPARATE_PARTITION, conf);
// stop the streaming query and get data
List<Row> actualResult = fetchResult(streamTableEnv, tableResult, 10);
List<Row> actualResult = fetchResult(streamTableEnv, tableResult, 60);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

60s is too long for the wait and sleeping.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know, this is for just testing whether it's really failing because of timeout.

Now another failure test case arose: ITTestDataStreamWrite#testWriteMergeOnReadWithCompaction, need some deep diving.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ITTestDataStreamWrite#testWriteMergeOnReadWithCompaction is flaky because sometimes 35s is not enough to complete the compaction.

TimeUnit.SECONDS.sleep(35); // wait long enough for the compaction to finish

@cshuo
Copy link
Collaborator Author

cshuo commented Mar 21, 2025

Created a ticket HUDI-9205, we'll refactor flink continuous testing to avoid using sleeping for data results. This pr can be closed.

@cshuo cshuo closed this Mar 21, 2025
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Hudi PR Support Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS PR with lines of changes in <= 10

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants

Comments