Skip to content

[PECOBLR-2086] Add comprehensive MST transaction metadata and edge case tests#1326

Open
vikrantpuppala wants to merge 6 commits intomainfrom
add-mst-transaction-tests
Open

[PECOBLR-2086] Add comprehensive MST transaction metadata and edge case tests#1326
vikrantpuppala wants to merge 6 commits intomainfrom
add-mst-transaction-tests

Conversation

@vikrantpuppala
Copy link
Copy Markdown
Collaborator

Summary

  • Adds 37 new E2E integration tests to TransactionTests.java covering gaps identified in the MST + xDBC Metadata RPCs audit
  • Covers all known broken CUJs: LC-13424 (executeUpdate/executeBatch in MST), LC-13425 (getColumns/DESCRIBE QUERY blocked by MSTCheckRule), LC-13427 (stale schema via Thrift), LC-13428 (concurrent DDL + parameterized DML)
  • Tests MSTCheckRule-blocked SQL statements (SHOW COLUMNS/TABLES/SCHEMAS/CATALOGS/FUNCTIONS, DESCRIBE TABLE EXTENDED, information_schema queries)
  • Tests allowed MST operations (setCatalog, setSchema, basic DESCRIBE TABLE)
  • Adds coverage for connection close with pending txn, DDL in txn, PreparedStatement metadata, batch operations, edge cases (empty txn, read-only, holdability, timeout, retry)

Test plan

  • Run mvn test -Dtest=TransactionTests against an MST-enabled warehouse
  • Verify all 37 new tests pass alongside the 25 existing tests
  • Confirm MSTCheckRule-blocked tests correctly detect transaction abort

NO_CHANGELOG=true

This pull request was AI-assisted by Isaac.

Adds 37 new E2E integration tests to TransactionTests.java covering
gaps identified in MST + xDBC metadata audit (LC-13424, LC-13425,
LC-13427, LC-13428):

- executeUpdate/executeLargeUpdate/executeBatch in transactions
- DatabaseMetaData operations (getColumns, getTables, etc.) in active txn
- PreparedStatement metadata before/after execute in transaction
- MSTCheckRule-blocked SQL (SHOW/DESCRIBE/information_schema) in MST
- Allowed operations (setCatalog, setSchema, DESCRIBE TABLE) in MST
- Connection close with pending transaction (implicit rollback)
- DDL behavior in transactions (CREATE/DROP/ALTER TABLE)
- PreparedStatement parameterized DML in transactions
- Concurrent DDL + parameterized DML (stale schema)
- Edge cases: empty txn, read-only txn, holdability, timeout, retry

Co-authored-by: Isaac
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
Co-authored-by: Isaac
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
- Add ignoreTransactions=0 to JDBC URL to enable MST
- Fix testCloseConnectionWithPendingTransaction: accept both auto-commit
  and rollback behaviors on close
- Fix testGetFunctionsInsideActiveTransaction: catch known driver logging
  bug (IllegalFormatConversionException in getFunctions)

Co-authored-by: Isaac
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
- setCatalog/setSchema/DESCRIBE TABLE are all blocked in MST via Thrift
  (SetCatalogCommand, SetNamespaceCommand, DescribeRelation) — tests now
  expect the exception
- getPrimaryKeys/getCrossReference may poison transaction in MST — wrapped
  in try-catch
- testParameterizedDMLAfterConcurrentAlterTable: catch driver logger bug
- testCommitWithoutActiveTransaction: remove message content assertion
- testTransactionContinuesAfterAllowedMetadataOp: use DML-only operations

Co-authored-by: Isaac
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
- Add transactionTests.yml workflow to run TransactionTests and
  ExplicitTransactionStatementTests on push to main (same pattern as
  concurrencyExecutionTests.yml)
- Update both e2e test classes to read credentials from env vars
  (DATABRICKS_HOST, DATABRICKS_TOKEN, DATABRICKS_HTTP_PATH, etc.)
  with fallback to hardcoded defaults for local development
- Fake service replay mode not yet possible for transaction tests
  due to LC-13424 (SEA INLINE disposition bug with MST commands)

Co-authored-by: Isaac
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
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.

2 participants