IGNITE-28102 Jdbc. Fix client observable timestamp skew in multistatement query cases#7949
Merged
xtern merged 6 commits intoapache:mainfrom Apr 8, 2026
Merged
IGNITE-28102 Jdbc. Fix client observable timestamp skew in multistatement query cases#7949xtern merged 6 commits intoapache:mainfrom
xtern merged 6 commits intoapache:mainfrom
Conversation
…result set fetch requests in order to maintain client's observable timestamp up to date Add stricter result set checks and assertions to affected flacky test
ptupitsyn
approved these changes
Apr 8, 2026
There was a problem hiding this comment.
Pull request overview
This PR addresses observable timestamp skew for thin-client SQL multi-statement flows by propagating the original request’s HybridTimestampTracker across subsequent “next result set” fetches, and hardens a flaky JDBC multi-statement integration test via stricter result validation utilities.
Changes:
- Propagate the “parent”
HybridTimestampTrackerfromSQL_EXECthrough saved next-result resources and apply it when handlingSQL_CURSOR_NEXT_RESULT_SET. - Introduce reusable JDBC test-fixture helpers (
StatementResultCheck,RowColumnProjection,RowsProjectionMatcher) to assert multi-statement results precisely. - Refactor
ItJdbcMultiStatementSelfTest.testMixedDmlQueryExecuteto validate each result/update count explicitly.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| modules/jdbc/src/testFixtures/java/org/apache/ignite/jdbc/util/StatementResultCheck.java | Adds a small DSL for asserting Statement results across getMoreResults() iterations. |
| modules/jdbc/src/testFixtures/java/org/apache/ignite/jdbc/util/RowsProjectionMatcher.java | Adds Hamcrest matchers for projected result-set row values (order-sensitive / insensitive). |
| modules/jdbc/src/testFixtures/java/org/apache/ignite/jdbc/util/RowColumnProjection.java | Adds a projector utility to drain a ResultSet into a list of extracted values. |
| modules/jdbc/src/integrationTest/java/org/apache/ignite/jdbc/ItJdbcMultiStatementSelfTest.java | Replaces a coarse result-size assertion with strict per-result assertions for a mixed DML/query script. |
| modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlExecuteRequest.java | Passes the request timestamp tracker into result-set writing so it can be propagated to next-result resources. |
| modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlCursorNextResultRequest.java | Reads the stored “parent” tracker and updates the current request tracker from it before writing the result. |
| modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlCommon.java | Stores parentTsTracker alongside next-result cursor futures (via NextCursorContext). |
| modules/client-handler/src/main/java/org/apache/ignite/client/handler/ClientInboundMessageHandler.java | Updates call site for the modified ClientSqlCursorNextResultRequest.process(...) signature. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
korlov42
approved these changes
Apr 8, 2026
xtern
reviewed
Apr 8, 2026
xtern
approved these changes
Apr 8, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
HybridTimestampTrackerfrom initial query request (can be refered as parent HTT) to each ongoing result set fetch requests, thus the client's observed timestamp is constantly updated.https://issues.apache.org/jira/browse/IGNITE-28102