Skip to content

Fix flaky test_database_delta::test_complex_table_schema timeout#96893

Merged
scanhex12 merged 1 commit intomasterfrom
fix-flaky-test_database_delta
Feb 14, 2026
Merged

Fix flaky test_database_delta::test_complex_table_schema timeout#96893
scanhex12 merged 1 commit intomasterfrom
fix-flaky-test_database_delta

Conversation

@alexey-milovidov
Copy link
Copy Markdown
Member

Summary

  • Fix flaky test_complex_table_schema timeout by removing the entire Derby metastore_db directory instead of just the lock file before each Spark session
  • After pkill -9, the Derby database can be corrupted, causing the next Spark session to hang during initialization until the 300-second timeout expires
  • Added a brief wait after pkill for the killed process to fully release resources

Closes #79109

CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=f922e78f99e9d597e235631c57fc14e6fe0e0e71&name_0=MasterCI&name_1=Integration%20tests%20%28amd_asan%2C%20db%20disk%2C%20old%20analyzer%2C%204%2F6%29

Test plan

  • Verify test_database_delta::test_complex_table_schema passes in CI without timeouts
  • Verify other test_database_delta tests are not affected

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):

...

🤖 Generated with Claude Code

The `execute_spark_query` function kills lingering Spark processes with
SIGKILL before starting a new session, but only removed the Derby
`metastore_db/dbex.lck` lock file. After SIGKILL, the Derby metastore
database can be left in a corrupted/inconsistent state, causing the next
Spark session to hang during initialization until the 300-second timeout
expires.

Fix by removing the entire `metastore_db` directory (not just the lock
file) and adding a brief wait after `pkill` for the killed process to
fully release its resources.

Closes: #79109

https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=f922e78f99e9d597e235631c57fc14e6fe0e0e71&name_0=MasterCI&name_1=Integration%20tests%20%28amd_asan%2C%20db%20disk%2C%20old%20analyzer%2C%204%2F6%29

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Feb 14, 2026

Workflow [PR], commit [0b6b61e]

Summary:

@scanhex12 scanhex12 added this pull request to the merge queue Feb 14, 2026
Merged via the queue into master with commit 54b9e25 Feb 14, 2026
135 checks passed
@scanhex12 scanhex12 deleted the fix-flaky-test_database_delta branch February 14, 2026 11:19
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-synced-to-cloud The PR is synced to the cloud repo label Feb 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

test_database_delta failed

3 participants