Skip to content

IGNITE-28102 Jdbc. Fix client observable timestamp skew in multistatement query cases#7949

Merged
xtern merged 6 commits intoapache:mainfrom
gridgain:ignite-28102
Apr 8, 2026
Merged

IGNITE-28102 Jdbc. Fix client observable timestamp skew in multistatement query cases#7949
xtern merged 6 commits intoapache:mainfrom
gridgain:ignite-28102

Conversation

@solveme
Copy link
Copy Markdown
Contributor

@solveme solveme commented Apr 7, 2026

  • Attach HybridTimestampTracker from 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.
  • Add stricter result set checks and assertions to affected flaky test

https://issues.apache.org/jira/browse/IGNITE-28102

…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
@solveme solveme changed the title IGNITE-30425 Fix client observable timestamp skew due in case of multistatement queries IGNITE-30425 Fix client observable timestamp skew in multistatement query cases Apr 7, 2026
@ptupitsyn ptupitsyn changed the title IGNITE-30425 Fix client observable timestamp skew in multistatement query cases IGNITE-28102 Fix client observable timestamp skew in multistatement query cases Apr 8, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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” HybridTimestampTracker from SQL_EXEC through saved next-result resources and apply it when handling SQL_CURSOR_NEXT_RESULT_SET.
  • Introduce reusable JDBC test-fixture helpers (StatementResultCheck, RowColumnProjection, RowsProjectionMatcher) to assert multi-statement results precisely.
  • Refactor ItJdbcMultiStatementSelfTest.testMixedDmlQueryExecute to 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.

@xtern xtern changed the title IGNITE-28102 Fix client observable timestamp skew in multistatement query cases IGNITE-28102 Jdbc. Fix client observable timestamp skew in multistatement query cases Apr 8, 2026
@xtern xtern merged commit ef1490f into apache:main Apr 8, 2026
5 checks passed
@xtern xtern deleted the ignite-28102 branch April 8, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants