Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: workaround a flaky source test #19729

Merged
merged 1 commit into from
Dec 10, 2024
Merged

test: workaround a flaky source test #19729

merged 1 commit into from
Dec 10, 2024

Conversation

xxchan
Copy link
Member

@xxchan xxchan commented Dec 10, 2024

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

This test becomes flaky. e.g., https://buildkite.com/risingwavelabs/pull-request/builds/63945

Probable reason: After #19467, CREATE SOURCE returns earlier than before (previously, it will wait for source reader created, i.e., connection established). Now it doesn't wait for that.
See also #19681 (comment)

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added test labels as necessary. See details.
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note

If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

@xxchan xxchan marked this pull request as ready for review December 10, 2024 04:13
@github-actions github-actions bot added the component/test Test related issue. label Dec 10, 2024
@xxchan xxchan enabled auto-merge December 10, 2024 04:19
@xxchan xxchan disabled auto-merge December 10, 2024 04:46
@xxchan
Copy link
Member Author

xxchan commented Dec 10, 2024

still failed...

@xxchan xxchan changed the title test: improve sleep time for a source test test: improve sleep time for a source test [debugging...] Dec 10, 2024
Copy link
Contributor

@StrikeW StrikeW left a comment

Choose a reason for hiding this comment

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

Previously I increased sleep to 6s and also add flush to release-2.1, but the main-cron for v2.1 still failed in release test. Rerun again it can pass.
Actually I didn't sure where the race condition exist, would appreciate any insight from you.

@xxchan
Copy link
Member Author

xxchan commented Dec 10, 2024

sleep6s + flush can still fail

@xxchan
Copy link
Member Author

xxchan commented Dec 10, 2024

In this run. it takes ~1.2s to receive msg

#first log
2024-12-10T09:10:08.602685725Z DEBUG risingwave_connector::source::reader::reader: spawning connector split reader for multiple splits [Kafka(KafkaSplit { topic: "test-topic-19563", partition: 1, start_offset: Some(-1), stop_offset: None })]
...
#last log
2024-12-10T09:10:09.784461512Z  INFO risingwave_connector::source::kafka::source::reader: [KAFKA] MESSAGE RECEIVED: [Ok(Message { ptr: 0x7f00b2811f78 }), Ok(Message { ptr: 0x7f00b28120b8 }), Ok(Message { ptr: 0x7f00b28121f8 }), Ok(Message { ptr: 0x7f00b2812338 }), Ok(Message { ptr: 0x7f00b2812478 })] self.splits=[KafkaSplit { topic: "test-topic-19563", partition: 3, start_offset: Some(-1), stop_offset: None }, KafkaSplit { topic: "test-topic-19563", partition: 4, start_offset: Some(-1), stop_offset: None }]

@xxchan
Copy link
Member Author

xxchan commented Dec 10, 2024

Cannot trigger the failure any more after adding logs..

@xxchan
Copy link
Member Author

xxchan commented Dec 10, 2024

Great, this time it failed

it takes 1min14s. And no message consumed at all.

2024-12-10T10:10:40.638303204Z
...
2024-12-10T10:11:54.516867539Z

@xxchan
Copy link
Member Author

xxchan commented Dec 10, 2024

Strange. We can see the state table has latest offsets, but no data emited.

@xxchan xxchan force-pushed the xxchan/digital-otter branch from 50e760b to 4465f69 Compare December 10, 2024 16:18
@xxchan xxchan marked this pull request as ready for review December 10, 2024 16:18
@xxchan xxchan changed the title test: improve sleep time for a source test [debugging...] test: workaround a flaky source test Dec 10, 2024
@xxchan
Copy link
Member Author

xxchan commented Dec 10, 2024

See here for the analysis.
#19681 (comment)

Let's make it not flaky first to avoid troubling others.

Signed-off-by: xxchan <xxchan22f@gmail.com>
@xxchan xxchan force-pushed the xxchan/digital-otter branch from 4465f69 to fa23526 Compare December 10, 2024 16:21
@xxchan xxchan added this pull request to the merge queue Dec 10, 2024
@graphite-app graphite-app bot requested a review from a team December 10, 2024 16:59
Merged via the queue into main with commit 00ee666 Dec 10, 2024
28 of 29 checks passed
@xxchan xxchan deleted the xxchan/digital-otter branch December 10, 2024 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/test Test related issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants