You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary
Test-only PR stabilizing integration tests against ClickHouse Cloud, where async inserts cause data to be invisible to immediate follow-up reads and skew stats. Three changes: (1) DataTypeTests (client-v2) now forces server setting async_insert=0 for the whole test class, explicitly marked "tmp fix"; (2) testLogComment (client-v2 InsertTests) now queries clusterAllReplicas('default', system.query_log) with a retry loop (up to 10 attempts) instead of a single local system.query_log read; (3) StatementTest.testInsertWithAsyncInsert (jdbc-v2) reads counts via clusterAllReplicas so rows land regardless of which replica served the insert. No production source code is touched.
What this impacts
Integration test behavior only: client-v2/src/test/.../DataTypeTests.java, client-v2/src/test/.../InsertTests.java, jdbc-v2/src/test/.../StatementTest.java
No public API, reader/writer, or runtime code changes
Concerns
Medium rule fired: test-infra change affecting test scope — disabling async_insert across all of DataTypeTests means those tests no longer exercise cloud's async-insert path (acknowledged as a "tmp fix" in the code comment); worth tracking a follow-up to re-enable.
The retry loop in testLogComment has no sleep/backoff between attempts, so all 10 retries execute back-to-back and may not actually wait long enough for log propagation.
The reason will be displayed to describe this comment to others. Learn more.
Replica reads inflate insert counts
Medium Severity
clusterAllReplicas concatenates the user table from every node, so count() is multiplied by replica count. Cloud default uses SharedMergeTree on multiple replicas, so the exact 100000 checks fail and the async count < 100000 check can fail once the rows are visible on more than one node.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
There are few common failures in tests when run against cloud:
Checklist
Delete items not relevant to your PR: