Add session version exchange to SQL Exec API client - #1640
Add session version exchange to SQL Exec API client#1640aakash-saravanan-db wants to merge 4 commits into
Conversation
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>
There was a problem hiding this comment.
Verdict: 1 Low
Looks solid — the session-version exchange is implemented coherently (session-identity guard, atomic max-accumulation, reattach exclusion, clear-on-close) and is well covered by unit + serialization tests. One Low note about the unconditional execution_mode=FAST on every SEA session. The heartbeat path's parentStatement.shouldTrackSessionVersion() deref is safe (guarded by the null/statementId early-return at DatabricksResultSet:401), and equals/hashCode were correctly kept in sync on the touched model classes.
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>
There was a problem hiding this comment.
Verdict: 1 Medium
Looks solid overall — well-tested, correctly synchronized version tracking with monotonic max, session-identity guarding, and reattached-statement exclusion. One medium design note: the new execution_mode=FAST / session-version exchange is applied to all SEA sessions with no opt-out gate, which diverges from the repo's usual feature-flag rollout pattern.
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>
There was a problem hiding this comment.
Verdict: 1 Low
Looks good — a clean, well-tested addition of SQL Exec session-version exchange, and it incidentally fixes a real bug where the poll-loop GET was serializing the full ExecuteStatementRequest as its body. One Low note on thread-visibility of the new originatingSessionId field. Changelog entry and unit/serialization coverage are present.
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>
There was a problem hiding this comment.
Verdict: 1 Low
Looks good — clean, well-tested session-version exchange. The monotonic version tracking is properly session-scoped (open/close/forceClose clear it, updateSessionVersion guards on matching open session id under a lock), and reattached statement handles correctly carry null ownership so polling can't advance another connection's version. Thrift path and the 1-arg checkStatementAlive delegate unchanged. One low-severity note inline about the unconditional execution_mode=FAST on session creation.
Description
Thrift behavior is unchanged.
Testing
mvn -q spotless:checkgit diff --check