Skip to content

fix flaky test 03734_async_insert_two_db#94548

Merged
bharatnc merged 2 commits intomasterfrom
ncb/fix-03734_async_insert_two_db
Jan 20, 2026
Merged

fix flaky test 03734_async_insert_two_db#94548
bharatnc merged 2 commits intomasterfrom
ncb/fix-03734_async_insert_two_db

Conversation

@bharatnc
Copy link
Copy Markdown
Contributor

@bharatnc bharatnc commented Jan 19, 2026

In this test we do async inserts (async_insert) and don't wait for them (wait_for_async_insert). We later attempt to flush the async insert queue and then do a select count() from the tables. I suspect that sometimes there might be a slight delay for all the inserts to be properly queued. So, when the insert queue is flushed, it might not return expected results resulting in the test being flaky (from cidb).

Also renames file to fix typo.

Closes: #93448

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

...

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Jan 19, 2026

Workflow [PR], commit [ccfaa59]

Summary:

@clickhouse-gh clickhouse-gh bot added the pr-ci label Jan 19, 2026
@CheSema
Copy link
Copy Markdown
Member

CheSema commented Jan 19, 2026

No sleeps please.

It was intentionally to not wait inserts and flush them with system flush async insert queue.

The issue here that some inserts are flushed by timeout and processed out of the scope flush command.

So, make this

- CH_CLIENT="${CH_CLIENT} --async_insert_use_adaptive_busy_timeout=0 --async_insert_busy_timeout_min_ms=1000 --async_insert_busy_timeout_max_ms=5000"
+ CH_CLIENT="${CH_CLIENT} --async_insert_use_adaptive_busy_timeout=0 --async_insert_busy_timeout_min_ms=10000 --async_insert_busy_timeout_max_ms=50000"

Copy link
Copy Markdown
Member

@CheSema CheSema left a comment

Choose a reason for hiding this comment

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

lest change it other way

@CheSema CheSema assigned CheSema and unassigned rienath Jan 19, 2026
@bharatnc bharatnc requested a review from CheSema January 19, 2026 15:18
@bharatnc
Copy link
Copy Markdown
Contributor Author

No sleeps please.

It was intentionally to not wait inserts and flush them with system flush async insert queue.

The issue here that some inserts are flushed by timeout and processed out of the scope flush command.

So, make this

- CH_CLIENT="${CH_CLIENT} --async_insert_use_adaptive_busy_timeout=0 --async_insert_busy_timeout_min_ms=1000 --async_insert_busy_timeout_max_ms=5000" + CH_CLIENT="${CH_CLIENT} --async_insert_use_adaptive_busy_timeout=0 --async_insert_busy_timeout_min_ms=10000 --async_insert_busy_timeout_max_ms=50000"

Sure, fixed.

@bharatnc
Copy link
Copy Markdown
Contributor Author

Wonderful, all checks are green!

@bharatnc bharatnc added this pull request to the merge queue Jan 20, 2026
Merged via the queue into master with commit e1ef744 Jan 20, 2026
132 checks passed
@bharatnc bharatnc deleted the ncb/fix-03734_async_insert_two_db branch January 20, 2026 01:34
@bharatnc bharatnc added the 🍃 green ci 🌿 Fixing flaky tests in CI label Jan 20, 2026
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-synced-to-cloud The PR is synced to the cloud repo label Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🍃 green ci 🌿 Fixing flaky tests in CI pr-ci pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

03734_async_isnert_two_db is flaky (<-- and it has a typo in its name)

4 participants