Repository navigation
Defer meta data refresh to transaction commit for DDL in PostgreSQL transaction - #39882
rishi-rana wants to merge 20 commits into
Conversation
3da5f5b to
1cf2aad
Compare
terrymanu
left a comment
There was a problem hiding this comment.
Result
Review Result: Not Mergeable
Feedback Mode: Change Request
Blocking Issues: 2
The deferred-refresh design causes a cross-dialect regression and cannot safely replay multiple transactional DDL statements.
Blocking Issues
-
[P1] Preserve immediate refresh for implicit-commit dialects
Evidence:
StandardDatabaseProxyConnector.java:252now defers every metadata refresh whenever the logical session is in a transaction, without considering the backend dialect.MySQLDatabaseMetaData.java:85retainsNO_ADDITIONAL_COMMIT, so ShardingSphere does not clear the transaction before entering this branch. On rollback,ProxyBackendTransactionManager.java:171discards the queued refresh. MySQL documents that ordinaryCREATE TABLEand other listed DDL statements implicitly commit the active transaction. MySQL 8.4 Reference ManualImpact: With
BEGIN; CREATE TABLE t (...); ROLLBACK;, MySQL commits the table creation, but this PR discards its metadata refresh. The table remains physically present while ShardingSphere metadata remains stale.Required Change: Defer only when the backend keeps DDL uncommitted and invisible to the refresh connection. Preserve immediate refresh for implicit-commit dialects and add a regression test covering MySQL DDL followed by rollback.
-
[P1] Do not replay statement-local refreshers against the transaction’s final state
Evidence:
DeferredMetaDataRefreshContext.java:50stores each original statement andDeferredMetaDataRefreshContext.java:87replays them after every DDL has committed. The existing create-table refresher reloads the statement’s original table name (CreateTablePushDownMetaDataRefresher.java:51); when that name no longer exists, the loader returnsnull(TableMetaDataRefresherLoader.java:89), which the standalone service dereferences (StandaloneMetaDataManagerPersistService.java:113). The one-storage-unit routing path allows both statements to reach the database without requiring refreshed metadata (SingleSQLRouter.java:52).Impact: For PostgreSQL,
BEGIN; CREATE TABLE t (...); ALTER TABLE t RENAME TO u; COMMIT;commits successfully at the database, then replay attempts to load the now-absentt, fails before processing the rename, reports a commit error after the physical commit, and leavesuabsent from ShardingSphere metadata.Required Change: Represent the final committed metadata effects rather than replaying unchanged statement-local refreshers. Coalesce operations or perform a transaction-level reload that handles renamed and removed objects, with regression coverage for sequences such as create-plus-rename and create-plus-drop.
Coverage
- Candidate: public PR #39882, Code Correctness Review.
- Effective head:
62a116f429ba317bbadb26bc3b74425f9dff8bee. - Base:
masterat86c1519e4d6deaf68e18ee47196e81da2e114f62; merge base101c3d56ccd7ee3c4a390a8f37550bed58a4751c. - GitHub’s 13-file list matched the independently reconstructed triple-dot scope.
- All behavior clusters were reviewed:
- PostgreSQL capability activation and prerequisite tests.
- Deferred enqueue, transaction lifecycle, savepoints, commit, and rollback.
- Unit/E2E coverage and E2E registration.
- Release-note and AI-assistance disclosure requirements.
- Root-cause, blast-radius/contracts, tests/runtime/operations, and final convergence passes completed. No unresolved evidence gaps remain.
- Mandatory style verification:
./mvnw -pl database/connector/dialect/postgresql,proxy/backend/core,test/e2e/operation/transaction spotless:check checkstyle:check -Pcheck -T1C- Exit code:
0; Spotless covered 26, 243, and 60 Java files in the three modules, and Checkstyle reported zero violations in each. - Both checks covered all 11 changed Java files.
RELEASE-NOTES.mdandtest/e2e/operation/transaction/src/test/resources/env/e2e-env.propertiesare not governed by the configured Java/POM/workflow Spotless formats or Java Checkstyle scope.
- Focused verification passed:
- PostgreSQL metadata and four proxy test classes: 116 tests, zero failures/errors.
- Transaction E2E module test compilation: 60 sources compiled successfully.
- Docker-backed E2E execution was not run; it is not outcome-sensitive to the two code-proven blockers.
- CI/Actions were not reviewed. This is a code-scope result only; local style verification is complete.
|
Thanks for both findings. Addressed in 5c5ea8b.
1. Implicit-commit dialects Reloading committed state makes the outcome independent of how the backend treats DDL, so the implementation does not branch on dialect and no dialect capability is introduced. A rollback reloads the affected tables:
Regression coverage is 2. Replaying statement-local refreshers Statements are not replayed, so a refresher cannot run against a table name that a later statement in the same transaction removed. Savepoint tracking is not required, because reloading final state is already correct after a partial rollback. Verification
|
terrymanu
left a comment
There was a problem hiding this comment.
Result
Review Result: Not Mergeable
Feedback Mode: Change Request
Blocking Issues: 3
The deferred-refresh representation loses required metadata semantics, refreshes implicit-commit dialects too late, and is protected by tests that do not exercise a reachable production DDL path.
Blocking Issues
-
[P1] Preserve object type and identifier semantics in deferred refreshes
Evidence:
refreshMetaDataconverts every supported metadata-changing DDL into(database, schema, Collection<String> tableNames). The refresh engine also supports schema and view statements (PushDownMetaDataRefreshEngine.java:58), but schema statements have no table attribute, while view refreshers must update both table and view metadata (CreateViewPushDownMetaDataRefresher.java:43). The deferred context only invokesreloadTable(DeferredMetaDataRefreshContext.java:46).The conversion also discards identifier quoting:
TablesContextstores onlyIdentifierValue#getValue()(TablesContext.java:69), andreloadTable(String)recreates an unquoted identifier (ContextManager.java:220). PostgreSQL’s identifier policy distinguishes quoted mixed-case identifiers from unquoted lower-case identifiers.Impact:
BEGIN; CREATE SCHEMA s; COMMITqueues nothing, transactional view DDL never updates the view registry, and DDL against a quoted table such as"MixedCase"can take the “table missing” drop path instead of persisting the reloaded table.Required Change: Represent every supported deferred metadata effect with its object type and complete identifier semantics. Add transactional regression coverage for schema DDL, view DDL, and quoted PostgreSQL table names.
-
[P1] Preserve immediate refresh for implicit-commit dialects
Evidence: MySQL retains
DDLCommitPolicy.NO_ADDITIONAL_COMMITwhile permitting metadata refresh in transactions (MySQLDatabaseMetaData.java:83). The shared connector nevertheless defers whenever the logical transaction flag remains set. Reloading occurs only during a later Proxy commit or rollback. The new E2E test itself documents that MySQL commits the DDL implicitly, but checks metadata only after callingrollback(MySQLDDLMetaDataRefreshTestCase.java:33).Impact: After MySQL physically commits
ALTER TABLE, shared ShardingSphere metadata remains stale until the originating client eventually sends a logical commit or rollback. Other sessions can observe the committed database change while Proxy still holds the old metadata. Reloading after rollback fixes the previous stale endpoint but not this interval.Required Change: Refresh immediately when backend DDL has already committed, or restrict deferral to dialects whose DDL remains transactional. The MySQL E2E case should assert metadata correctness before the later rollback.
-
[P2] Exercise a reachable DDL path and follow the test standards
Evidence:
assertExecuteDefersMetaDataRefreshInTransactionconstructs anInsertStatementand forcesPushDownMetaDataRefreshEngine#isNeedRefresh()to returntrue. Production returnstrueonly for the listed DDL statement classes, so this combination is unreachable and cannot detect the failures above. The test also adds direct construction/static mocking without the required recorded reason, andDeferredMetaDataRefreshContextTest.java:59uses redundanttimes(1), contrary toCODE_OF_CONDUCT.md:104.Impact: The focused suite passes while the actual DDL extraction and deferred representation are broken.
Required Change: Exercise the connector with real supported DDL contexts, cover the affected object and identifier cases, use the repository mock extension where applicable or record why it cannot apply, and replace
times(1)with plainverify.
Coverage
- Candidate: public PR #39882, Code Correctness Review.
- Effective head:
5c5ea8bc04097599338aff374bb0b26ad0ce76bc. - Base:
masterat86c1519e4d6deaf68e18ee47196e81da2e114f62; merge base101c3d56ccd7ee3c4a390a8f37550bed58a4751c. - GitHub’s authoritative 14-file list matched the merge-base comparison and remained unchanged after verification.
- All behavior clusters were reviewed: PostgreSQL capability activation; deferred enqueue and transaction lifecycle; table/schema/view/index refresh contracts; identifier handling; MySQL implicit-commit compatibility; unit/E2E coverage and registration; release notes.
- Previous feedback was re-evaluated: statement replay is removed; the implicit-commit rollback endpoint is fixed, but the refresh-timing regression remains.
- Root-cause, blast-radius/contracts, tests/runtime/operations, and final convergence passes completed. No unresolved evidence gaps remain.
- Mandatory style verification:
- Command:
./mvnw -pl database/connector/dialect/postgresql,proxy/backend/core,test/e2e/operation/transaction spotless:check checkstyle:check -Pcheck -T1C - Exit code:
0; Spotless checked 26, 243, and 61 Java files respectively, and Checkstyle reported zero violations. - Covered all 12 changed Java files:
database/connector/dialect/postgresql/src/main/java/org/apache/shardingsphere/database/connector/postgresql/metadata/database/PostgreSQLDatabaseMetaData.javadatabase/connector/dialect/postgresql/src/test/java/org/apache/shardingsphere/database/connector/postgresql/metadata/database/PostgreSQLDatabaseMetaDataTest.javaproxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/connector/ProxyDatabaseConnectionManager.javaproxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/connector/StandardDatabaseProxyConnector.javaproxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/connector/jdbc/transaction/DeferredMetaDataRefreshContext.javaproxy/backend/core/src/main/java/org/apache/shardingsphere/proxy/backend/connector/jdbc/transaction/ProxyBackendTransactionManager.javaproxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/connector/ProxySQLExecutorTest.javaproxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/connector/StandardDatabaseProxyConnectorTest.javaproxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/connector/jdbc/transaction/DeferredMetaDataRefreshContextTest.javaproxy/backend/core/src/test/java/org/apache/shardingsphere/proxy/backend/connector/jdbc/transaction/ProxyBackendTransactionManagerTest.javatest/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/operation/transaction/cases/metadata/MySQLDDLMetaDataRefreshTestCase.javatest/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/operation/transaction/cases/metadata/PostgreSQLDDLMetaDataRefreshTestCase.java
RELEASE-NOTES.mdandtest/e2e/operation/transaction/src/test/resources/env/e2e-env.propertiesare not governed by the configured Java Spotless or Checkstyle scopes.
- Command:
- Focused verification passed: 100 unit tests, zero failures/errors; the transaction E2E module compiled 61 test sources.
- Docker-backed E2E execution was not run; it is not outcome-sensitive to the code-proven blockers.
- CI/Actions were not reviewed. This is a code-scope result only; mandatory local style verification is complete.
|
Thanks, all three addressed in 3c86b00. Scope of this revision This revision changes behaviour for one case only: table DDL executed inside a transaction on PostgreSQL. Everything else is unchanged from master:
2. Immediate refresh for implicit-commit dialects
1. Object type and identifier semantics Deferral is restricted to table DDL. Identifiers are preserved: the deferred context stores the parsed 3. Reachable DDL path and test standards
The remaining construction mock is
Verification
On the intended scope Two questions, since both go beyond the reported case and I would rather agree the boundary than assume it. Should the deferral eventually cover the remaining metadata-changing statements rather than table DDL alone? Doing so needs a deferred representation carrying object type, and a view-level reload on Should other backends with transactional DDL opt in as well? SQL Server looks like the notable case: it permits metadata-changing DDL in a transaction today through |
|
CI status note, updated after the latest run. All checks pass on Two earlier red checks on this pull request turned out to be unrelated to it, recorded here in case anyone reads back through the history:
|
9c464ab to
cfbefd6
Compare
terrymanu
left a comment
There was a problem hiding this comment.
Result
Review Result: Not Mergeable
Feedback Mode: Needs Discussion
Blocking Issues: 2
The PR changes a published transaction limitation without a settled support boundary, and the new dialect gate also affects a documented mixed-database path.
Blocking Issues
-
Agree on the PostgreSQL transaction DDL contract.
Evidence: The maintained LOCAL and XA limitations say Proxy rejects metadata-changing PostgreSQL DDL in transactions. This PR permits four table DDL types, while its release note describes DDL more broadly.
Impact: Users receive conflicting guidance about which DDL is supported in LOCAL and XA transactions.
Discussion Needed: Confirm the exact supported statement and transaction types, then align the published contract with that decision. -
Resolve the PostgreSQL-protocol/MySQL-storage boundary.
Evidence: DB Gateway documents PostgreSQL protocol over MySQL storage. Both the permission gate and deferral decision use the statement dialect, although routing identifies the physical storage dialect separately. MySQL 5.7 implicitly commitsALTER TABLE.
Impact: A PostgreSQL-protocol transaction routed to MySQL can commit table DDL physically while Proxy defers its metadata refresh until the logical transaction ends. Other sessions can see stale metadata. The new MySQL E2E case covers a MySQL-protocol session, so it does not exercise this path.
Discussion Needed: Decide whether transactional DDL support is limited by the routed storage type, including mixed routes, and define the required metadata timing for that boundary.
Coverage
- Public PR #39882, Code Correctness Review; effective head
cfbefd6f88e856b80fbc6b19a29d04237e918567, base7ea8b8ce0fbe42472b185a4f45abf84ff278547f. GitHub’s authoritative 27-file list was accounted for using an exact-head source snapshot. - Reviewed the dialect-option changes; Proxy permission, execution, deferred queue, commit and rollback paths; unit and E2E tests; E2E registration; and release note. Rechecked the earlier statement-replay, direct-MySQL, and quoted-identifier objections. Root-cause, contract/blast-radius, test/runtime, and final convergence passes found no further independent blocker.
- Local style verification:
./mvnw -pl database/connector/core,database/connector/dialect/firebird,database/connector/dialect/h2,database/connector/dialect/mariadb,database/connector/dialect/mysql,database/connector/dialect/opengauss,database/connector/dialect/oracle,database/connector/dialect/postgresql,database/connector/dialect/sqlserver,proxy/backend/core,test/e2e/operation/transaction spotless:check checkstyle:check -Pcheck -T1Cexited0. Spotless selected Java files in all 11 modules; Checkstyle reported zero violations in each. The covered 25 PR-impact Java files were:database/connector/core:DialectDatabaseMetaData.java,DialectTransactionOption.java.database/connector/dialect:FirebirdDatabaseMetaData.java,H2DatabaseMetaData.java,MariaDBDatabaseMetaData.java,MySQLDatabaseMetaData.java,OpenGaussDatabaseMetaData.java,OracleDatabaseMetaData.java,PostgreSQLDatabaseMetaData.java,PostgreSQLDatabaseMetaDataTest.java,SQLServerDatabaseMetaData.java.proxy/backend/coreproduction:ProxyDatabaseConnectionManager.java,ProxySQLExecutor.java,StandardDatabaseProxyConnector.java,DeferredMetaDataRefreshContext.java,ProxyBackendTransactionManager.java.proxy/backend/coretests:ProxySQLExecutorTest.java,StandardDatabaseProxyConnectorTest.java,DeferredMetaDataRefreshContextTest.java,ProxyBackendTransactionManagerTest.java,BeginTransactionProxyBackendHandlerTest.java,CommitProxyBackendHandlerTest.java,SetAutoCommitProxyBackendHandlerTest.java.test/e2e/operation/transaction:MySQLDDLMetaDataRefreshTestCase.java,PostgreSQLDDLMetaDataRefreshTestCase.java.
- Checkstyle and Spotless are Not Applicable to
RELEASE-NOTES.mdandtest/e2e/operation/transaction/src/test/resources/env/e2e-env.propertiesunder the configured Java and workflow-file scopes. - Focused reactor tests passed: 101 tests, zero failures. An initial non-reactor compile used a stale locally installed core artifact; the corrected
-amrun passed. Docker-backed E2E was not run. This is a code-scope result; CI was not reviewed. - Jev: the typesafe-ai skill was not used for this deep code review. Jev MCP was not called because quota or balance was unconfirmed: 0 calls and judgments, no effect on routing, prioritization, conclusions, or plan. Efficiency cannot be measured accurately; problems: none found.
|
Both points are fair. Here is the contract I propose, so the boundary is agreed before I change anything further. 1. Supported statements and transaction types Proposed contract:
If that is the boundary you want, I will align the published contract with it:
One question inside this point. Should the contract be written as "PostgreSQL" or as "backends whose DDL is transactional"? SQL Server is the case that decides the wording: it permits metadata-changing DDL in a transaction today through 2. Protocol dialect against routed storage dialect You are right that both decisions currently read the statement dialect, and that this is wrong for DB Gateway. Proposed rule:
For coverage I would add unit tests for a PostgreSQL-protocol session routed to MySQL storage, and for a mixed route, asserting that DDL is rejected rather than deferred in both. Please confirm or correct these two, and I will implement and update the documentation accordingly. |
terrymanu
left a comment
There was a problem hiding this comment.
Result
Review Result: Not Mergeable
Feedback Mode: Needs Discussion
Blocking Issues: 2
PR #39882 enables a transaction behavior whose supported scope is still unsettled, and its dialect decision can disagree with the routed storage.
Blocking Issues
-
Agree on the transactional DDL contract.
Evidence: The maintained LOCAL and XA limitations say Proxy rejects metadata-changing PostgreSQL DDL in transactions. The PR permits four table DDL statement types; its non-XA branch does not exclude BASE. The release note says “DDL” broadly. The author has proposed a narrower contract and requested confirmation.
Impact: Code and published guidance disagree about which statements and transaction types users can rely on.
Discussion Needed: Confirm the supported statements, transaction types, and backend scope, then align the implementation and published contract.
-
Resolve the protocol dialect versus routed storage dialect boundary.
Evidence: DB Gateway documents PostgreSQL protocol over MySQL storage. Routing resolves physical storage type separately, while both the permission check and deferral decision use the statement dialect. MySQL 5.7 implicitly commits
ALTER TABLE; the queued refresh runs only when Proxy later commits or rolls back.Impact: In a PostgreSQL-protocol LOCAL transaction routed to MySQL, storage can expose the DDL while Proxy still has stale metadata. The new MySQL E2E case uses a MySQL-protocol session and does not cover this route.
Discussion Needed: Define transactional DDL support and refresh timing using the routed storage types, including mixed routes, so permission and deferral follow one agreed rule.
Coverage
- Public PR #39882, Code Correctness Review. Effective head
cfbefd6f88e856b80fbc6b19a29d04237e918567; base7ea8b8ce0fbe42472b185a4f45abf84ff278547f. GitHub’s authoritative 27-file list was accounted for against an exact-head source snapshot. The head was rechecked after verification. A local PR ref was unavailable, so no local triple-dot comparison was made. - Reviewed the dialect option and eight dialect call sites; Proxy permission, execution, queue, commit and rollback paths; unit and E2E tests and registration; release note; and maintained transaction and DB Gateway contracts. Root-cause, contract/blast-radius, tests/runtime, and final convergence passes found no further independent blocker or outcome-sensitive evidence gap. Earlier statement-replay, direct-MySQL, and quoted-identifier objections were rechecked against the current implementation.
- Local style verification:
./mvnw -pl database/connector/core,database/connector/dialect/firebird,database/connector/dialect/h2,database/connector/dialect/mariadb,database/connector/dialect/mysql,database/connector/dialect/opengauss,database/connector/dialect/oracle,database/connector/dialect/postgresql,database/connector/dialect/sqlserver,proxy/backend/core,test/e2e/operation/transaction spotless:check checkstyle:check -Pcheck -T1Cexited0. All 11 module Java scopes were selected by Spotless; all 11 Checkstyle summaries reported zero violations. - Both checks covered all 25 PR-impact Java files:
database/connector/core—DialectDatabaseMetaData.java,DialectTransactionOption.java; dialect modules —FirebirdDatabaseMetaData.java,H2DatabaseMetaData.java,MariaDBDatabaseMetaData.java,MySQLDatabaseMetaData.java,OpenGaussDatabaseMetaData.java,OracleDatabaseMetaData.java,PostgreSQLDatabaseMetaData.java,PostgreSQLDatabaseMetaDataTest.java,SQLServerDatabaseMetaData.java;proxy/backend/coreproduction —ProxyDatabaseConnectionManager.java,ProxySQLExecutor.java,StandardDatabaseProxyConnector.java,DeferredMetaDataRefreshContext.java,ProxyBackendTransactionManager.java; its tests —ProxySQLExecutorTest.java,StandardDatabaseProxyConnectorTest.java,DeferredMetaDataRefreshContextTest.java,ProxyBackendTransactionManagerTest.java,BeginTransactionProxyBackendHandlerTest.java,CommitProxyBackendHandlerTest.java,SetAutoCommitProxyBackendHandlerTest.java; transaction E2E —MySQLDDLMetaDataRefreshTestCase.java,PostgreSQLDDLMetaDataRefreshTestCase.java. - Checkstyle and Spotless are Not Applicable to
RELEASE-NOTES.mdandtest/e2e/operation/transaction/src/test/resources/env/e2e-env.propertiesunder the configured Java, POM, and workflow-file scopes. Runtime and Docker E2E tests were not run. This is a code-scope result; CI was not reviewed. - Jev: the
typesafe-aiskill was not used because this deep code review was not a bounded judgment; it provided no guidance. Jev MCP was not called: 0 calls and judgments, with no effect on routing, prioritization, conclusions, or plan. Efficiency change cannot be measured accurately; problems: none found.
|
Thanks. Both points are addressed in b6cb07f. 1. Transactional DDL contract The contract is now:
On backend scope: I have left 2. Protocol dialect against routed storage dialect The capability is now resolved from the storage units the statement is routed to, requiring every routed unit to keep DDL transactional. Mixed routes and any implicit-commit storage fall back to the previous behaviour, so a PostgreSQL-protocol session routed to MySQL behaves as a MySQL session does. One predicate, A correctness problem this surfaced While covering The deferred tables are therefore reconciled through a new A limitation worth recording A statement cannot reference a table created earlier in the same transaction: Verification
|
terrymanu
left a comment
There was a problem hiding this comment.
Result
Review Result: Not Mergeable
Feedback Mode: Needs Discussion
Blocking Issues: 4
The latest revision fixes the earlier protocol-versus-storage decision and BASE scope problems. However, two metadata correctness defects, one written coding-standard violation, and an unsettled support contract remain.
Blocking Issues
-
[P1] Metadata deletion uses the original identifier instead of its canonical name.
Evidence: ContextManager.java:294 passes
tableName.getValue()directly to the deletion service. The persistence service deletes the node using that name. PostgreSQL 12 documentation specifies that unquoted identifiers are folded to lowercase. An isolated verification confirmed that the deletion targets/tables/FOO, while the existing record is/tables/foo.Impact: After
BEGIN; DROP TABLE FOO; COMMIT;physically dropsfoo, its persisted metadata remains. If a separate"FOO"table exists, the operation can also delete that other table’s metadata.Discussion Needed: Deletion must follow the canonical storage and metadata name while preserving quoted-identifier distinctions. The previous head’s refresh path also contained this problem; it was missed in the previous public review.
-
[P1] Reconciling every table against the first route changes single-table storage ownership.
Evidence: StandardDatabaseProxyConnector.java:296 records the same data source for every table. The loader called by the new reconciler adds that node to the shared single-table rule. In isolated verification, the configuration changed from
[ds_1.public.b]to[ds_1.public.b, ds_0.public.b].Impact: When
aandbreside on different PostgreSQL storage units,SAVEPOINT s; DROP TABLE IF EXISTS a,b; ROLLBACK TO s; COMMIT;reconciles both surviving tables and adds an incorrect data node for the second table.Discussion Needed: Reconciliation after a savepoint rollback must preserve each table’s original storage ownership. This defect was introduced by the latest commit’s new
reconcileTableloading path. -
The new transactional DDL support boundary still requires a project decision.
Evidence: The original issue reports the problem after manually removing the restriction. The author subsequently requested confirmation of the support contract. The latest limitations documentation publishes LOCAL/XA support for four table DDL categories and adds a restriction preventing subsequent statements from referencing a table created in the same transaction. The complete public discussion contains no maintainer decision accepting that full boundary.
Impact: Documentation and implementation now agree, but the new support scope and usage restrictions remain a contributor-proposed contract.
Discussion Needed: Explicitly accept or adjust the statement categories, transaction types, backend scope, and availability of newly created tables within the same transaction. Updating documentation does not itself establish project acceptance.
-
[P2] The added method layout violates the written private-helper ordering rule.
Evidence: CODE_OF_CONDUCT.md:48 requires private helpers to immediately follow their caller and appear in call order. The added
reconcileTableseparatesreloadTablefrompersistTable; the connector’s two decision helpers appear in the reverse of their call order; and the new E2E class declares its third phase first.Impact: The candidate does not satisfy a repository rule that requires manual verification. Passing Checkstyle and Spotless does not establish compliance with this rule.
Discussion Needed: The merge candidate must still satisfy the written declaration-order requirements.
Coverage
- Public PR #39882; Code Correctness Review. This is a code-scope result; CI was not reviewed. Effective head:
b6cb07f42e456c1de4c7b41c9150a046d16b51a8; base:7ea8b8ce0fbe42472b185a4f45abf84ff278547f; merge-base:101c3d56ccd7ee3c4a390a8f37550bed58a4751c. GitHub’s authoritative 30-file list matched the public triple-dot comparison. An exact-head snapshot was used, and the final head recheck confirmed no change. There was no local code delta. - Reviewed transaction capabilities and every constructor call site; Proxy permission and actual-storage routing; commit, rollback, and savepoints; metadata reconciliation and persistence; single-table rules; unit/E2E tests and registration; both limitations documents; and release notes. The PostgreSQL post-commit refresh objective was assessed against #35166, alongside the other affected dialects and openGauss restrictions. Root-cause, contract-impact, test/runtime, and final convergence passes were completed, with no unresolved evidence gaps.
- Local style command:
./mvnw -B -pl database/connector/core,database/connector/dialect/firebird,database/connector/dialect/h2,database/connector/dialect/mariadb,database/connector/dialect/mysql,database/connector/dialect/opengauss,database/connector/dialect/oracle,database/connector/dialect/postgresql,database/connector/dialect/sqlserver,mode/core,proxy/backend/core,test/e2e/operation/transaction spotless:check checkstyle:check -Pcheck -T1C; exit code0. - Both checks covered all 26 changed Java files:
database/connector/core:DialectDatabaseMetaData.java,DialectTransactionOption.java.- Dialect modules:
FirebirdDatabaseMetaData.java,H2DatabaseMetaData.java,MariaDBDatabaseMetaData.java,MySQLDatabaseMetaData.java,OpenGaussDatabaseMetaData.java,OracleDatabaseMetaData.java,PostgreSQLDatabaseMetaData.java,PostgreSQLDatabaseMetaDataTest.java,SQLServerDatabaseMetaData.java. mode/core:ContextManager.java.proxy/backend/core:ProxyDatabaseConnectionManager.java,ProxySQLExecutor.java,StandardDatabaseProxyConnector.java,DeferredMetaDataRefreshContext.java,ProxyBackendTransactionManager.java; andProxySQLExecutorTest.java,StandardDatabaseProxyConnectorTest.java,DeferredMetaDataRefreshContextTest.java,ProxyBackendTransactionManagerTest.java,BeginTransactionProxyBackendHandlerTest.java,CommitProxyBackendHandlerTest.java,SetAutoCommitProxyBackendHandlerTest.java.- Transaction E2E:
MySQLDDLMetaDataRefreshTestCase.java,PostgreSQLDDLMetaDataRefreshTestCase.java.
- Checkstyle also selected and passed
test/e2e/operation/transaction/src/test/resources/env/e2e-env.properties. Spotless is Not Applicable to that properties file. Both tools are Not Applicable toRELEASE-NOTES.mdand the twolimitations.*.mdfiles, based on the configured Java/POM/workflow formatting scopes and Checkstyle file extensions. - Six focused test classes ran against the exact-source reactor: 134 tests, 0 failures/errors, exit code
0. One-amrun ensured that cross-module constructors and behavior came from current source. Both isolated verifications exited0, confirming the incorrect deletion key and incorrect data-node registration respectively. Docker E2E was not run. - Jev: the
typesafe-aiskill was not used and provided no guidance; this deep, multi-step code review remained in Codex. Jev MCP calls and judgments:0. Jev did not change routing, prioritization, conclusions, or the plan. Efficiency changes cannot be measured accurately; problems: none found.
|
Thanks, both correctness findings are confirmed and addressed in 709aaf7. 1. Deletion key
2. Data source attribution Each deferred table is now matched to its own 4. Declaration order
Verification: 112 unit tests pass across 3. Support contract I don't have authority to settle this myself, so I'd like explicit sign-off before treating it as decided. The contract as it currently stands in
@terrymanu could you confirm whether this is the scope you're willing to accept, or whether any of the four points above should be narrowed, widened, or deferred to a separate PR? I'll update the docs and/or code to match whatever you decide. |
terrymanu
left a comment
There was a problem hiding this comment.
Result
Review Result: Not Mergeable
Feedback Mode: Needs Discussion
Blocking Issues: 4
The canonical-name and per-table routing fixes are confirmed. Two metadata defects, written coding-standard violations, and an unsettled support contract remain.
Blocking Issues
-
[P1] BASE transactions can discard refreshes for already committed DDL.
Evidence: ProxySQLExecutor.java:156 permits metadata-changing DDL under MySQL protocol in BASE. The deferral condition queues it when storage is PostgreSQL, without excluding BASE. Seata 2.6.0’s PlainExecutor executes this DDL directly.
Impact: With MySQL protocol, PostgreSQL storage, and Seata BASE,
BEGIN; ALTER TABLE t ADD COLUMN c INT; ROLLBACK;physically commits the column, then discards its queued refresh. ShardingSphere metadata remains stale. An isolated probe confirmed permission, parser acceptance, unchanged SQL translation, and Seata’s plain execution path.Discussion Needed: The BASE exclusion must cover refresh timing as well as permission; storage capability alone does not establish transactional DDL execution.
-
[P2] Savepoint rollback can leave a nonexistent table registered in cluster routing.
Evidence: ContextManager.java:302 calls the creation loader before checking table absence. The loader adds a node to the live SingleRule. Cluster deletion of a never-persisted table produces no event to remove that node.
Impact: In Cluster/ZooKeeper mode with wildcard SINGLE configuration and multiple storage units,
BEGIN; SAVEPOINT s; CREATE TABLE t (id INT); ROLLBACK TO s; COMMIT;leaves a routing entry for absentt. A subsequent CREATE fails withTableExistsException. An isolated current-source probe confirmed both effects. Full rollback and standalone mode do not exhibit this path.Discussion Needed: Reconciliation of an absent table must leave no temporary routing state behind.
-
[P2] The candidate still violates written coding standards.
Evidence: CODE_OF_CONDUCT.md governs class finality, private-helper order, and wrapping. Current violations include:
DeferredMetaDataRefreshContextTest.java:33: the new concrete class is not final.PostgreSQLDDLMetaDataRefreshTestCase.java:83: its unique helperawaitQueryableis separated from its caller until line 125.- Unnecessary wrapping in
ProxySQLExecutor.java:153,ContextManagerTest.java:392,MySQLDDLMetaDataRefreshTestCase.java:73, andPostgreSQLDDLMetaDataRefreshTestCase.java:109,126; reconstructed lines are 183–190 characters.
Impact: Passing Spotless and Checkstyle does not establish compliance with these manually enforced rules.
Discussion Needed: The final candidate must satisfy the written standards alongside the accepted behavior.
-
The transactional DDL support commitment still requires maintainer acceptance.
Evidence: The author explicitly requests sign-off on the four statement categories, LOCAL/XA scope, routed-storage capability, and inability to reference newly created tables before commit. The complete discussion contains no subsequent acceptance.
Impact: The updated documentation publishes a contributor-proposed support boundary and usage restriction.
Discussion Needed: Accept or adjust that boundary before treating it as the project contract.
The two functional defects already existed at the previously reviewed head and were missed then. The latest commit introduces the remaining unique-helper ordering violation; the other cited standards violations predate it.
Coverage
- Public PR #39882, Code Correctness Review. Effective head:
709aaf76cd776ac54777313d55599c1b07f8f607; base:7ea8b8ce0fbe42472b185a4f45abf84ff278547f; merge-base:101c3d56ccd7ee3c4a390a8f37550bed58a4751c. GitHub’s authoritative 31-file list matched its triple-dot comparison. The exact-head snapshot and final head recheck matched; no local code delta was included. - Reviewed dialect capabilities, routed permissions, LOCAL/XA/BASE lifecycle, savepoints, metadata persistence and routing, unit/E2E entry paths, registration, documentation, and release notes. Basis: #35166 and maintained transaction, Gateway, and Seata contracts. All three discovery lenses and final convergence completed; no unresolved decisive evidence gaps.
- Local style verification:
./mvnw -B -pl database/connector/core,database/connector/dialect/firebird,database/connector/dialect/h2,database/connector/dialect/mariadb,database/connector/dialect/mysql,database/connector/dialect/opengauss,database/connector/dialect/oracle,database/connector/dialect/postgresql,database/connector/dialect/sqlserver,mode/core,proxy/backend/core,test/e2e/operation/transaction spotless:check checkstyle:check -Pcheck -T1Cexited0. Both checks selected all 27 changed Java files:- Connector core:
DialectDatabaseMetaData,DialectTransactionOption. - Dialects:
FirebirdDatabaseMetaData,H2DatabaseMetaData,MariaDBDatabaseMetaData,MySQLDatabaseMetaData,OpenGaussDatabaseMetaData,OracleDatabaseMetaData,PostgreSQLDatabaseMetaData,PostgreSQLDatabaseMetaDataTest,SQLServerDatabaseMetaData. - Mode core:
ContextManager,ContextManagerTest. - Proxy backend:
ProxyDatabaseConnectionManager,ProxySQLExecutor,StandardDatabaseProxyConnector,DeferredMetaDataRefreshContext,ProxyBackendTransactionManager; andProxySQLExecutorTest,StandardDatabaseProxyConnectorTest,DeferredMetaDataRefreshContextTest,ProxyBackendTransactionManagerTest,BeginTransactionProxyBackendHandlerTest,CommitProxyBackendHandlerTest,SetAutoCommitProxyBackendHandlerTest. - Transaction E2E:
MySQLDDLMetaDataRefreshTestCase,PostgreSQLDDLMetaDataRefreshTestCase.
- Connector core:
- Checkstyle also selected and passed
test/e2e/operation/transaction/src/test/resources/env/e2e-env.properties; Spotless is Not Applicable to it. Both checks are Not Applicable toRELEASE-NOTES.mdand bothlimitations.*.mdfiles under the configured scopes. - Six focused test classes passed against the source reactor: 138 tests, 0 failures/errors, exit
0. Both isolated Java probes exited0; physical metadata absence and external persistence were mocked in the cluster probe../mvnw -B apache-rat:check -Pcheck -T1Cexited0. Docker E2E was not run. - This is a code-scope result; CI was not reviewed.
- Jev: skill unused; MCP calls/judgments
0because this required deep, multi-step source analysis. No effect on routing, prioritization, conclusions, or plan. Efficiency changes cannot be measured accurately; problems: none found.
|
Thanks, both correctness findings confirmed and addressed in b65352b, along with the style findings.
Verification: 921 tests pass across the full
|
|
Correction to my last comment's point 3: CI failed after that push. <module name="MatchXpath">
<property name="query" value="//CLASS_DEF[./IDENT[ends-with(@text, 'Test')]]/MODIFIERS/FINAL" />
<message key="matchxpath.match" value="Unit-test classes must not be declared final." />
</module>That directly contradicts the finding I implemented. Reverted in 8ba4e56; verified against a worktree merging this branch onto current |
terrymanu
left a comment
There was a problem hiding this comment.
Result
Review Result: Not Mergeable
Feedback Mode: Needs Discussion
Blocking Issues: 3
Two metadata defects remain, and the proposed transactional DDL support contract still needs maintainer acceptance.
Blocking Issues
-
[P2] Committed DROP leaves obsolete explicit SINGLE configuration persisted.
Evidence: ContextManager.java:307 removes the routing node before calling
dropTables. The standalone persistence service then seesisNeedRefresh=falseand skips persisting the changed SINGLE configuration. An isolated current-source probe confirmed this sequence.Impact: With an explicitly configured SINGLE table,
BEGIN; DROP TABLE t; COMMIT;removes table metadata and live configuration, while persisted configuration retainsds.public.t. Reloading and exporting that configuration still producesLOAD SINGLE TABLE ds.public.t;.Discussion Needed: Reconciliation must preserve configuration persistence while cleaning up speculative routing. This defect was introduced by the latest cleanup commit,
b65352b219f. -
[P2] Cross-schema DROP records every table under the first schema.
Evidence: StandardDatabaseProxyConnector.java:296–299 computes one schema for the entire statement. PostgreSQL permits multiple schema-qualified DROP targets. The parser, binder, routing and rewriting paths preserve those distinct schemas; an isolated public-connector probe confirmed the incorrect deferred records.
Impact: On one PostgreSQL storage unit,
BEGIN; DROP TABLE schema_a.a, schema_b.b; COMMIT;reconcilesschema_a.aandschema_a.b, leaving metadata for the physically droppedschema_b.b.Discussion Needed: The proposed table-DDL support must preserve each target’s schema. The immediate refresher has a similar pre-existing limitation, but this PR newly permits the transactional statement and owns these deferred records. This defect predates the latest fixes and was missed in earlier reviews.
-
The transactional DDL support commitment remains unsettled.
Evidence: Issue #35166 reproduces the problem after manually removing the existing restriction. The author explicitly requests maintainer sign-off and still reports it as pending. The complete public discussion contains no subsequent acceptance.
Impact: The updated limitations publish a new support boundary and a restriction on referencing tables created earlier in the same transaction.
Discussion Needed: Accept or adjust the four table-DDL categories, LOCAL/XA scope, routed-storage capability requirement, and visibility of newly created tables before commit.
Coverage
- Public PR #39882; Code Correctness Review. Effective head:
8ba4e568e0aceaae7afb4e9a8be9406305b1cfc5; base:7ea8b8ce0fbe42472b185a4f45abf84ff278547f; merge-base:101c3d56ccd7ee3c4a390a8f37550bed58a4751c. GitHub’s authoritative 31-file list matched the triple-dot API comparison. An exact-head snapshot was used; the final head remained unchanged. No local code delta was included. - Reviewed dialect capabilities and constructor callers; routed permissions; LOCAL/XA/BASE lifecycle; savepoints; metadata reconciliation, persistence and SINGLE routing; unit/E2E entry paths and registration; both limitations documents; release notes. Basis: #35166, maintained transaction restrictions, and PostgreSQL semantics. Root-cause, contract-impact, tests/runtime and convergence passes completed with no unresolved decisive evidence gaps.
- Previous canonical-name, data-source attribution, BASE-deferral, wildcard savepoint-routing, wrapping and helper-order findings are fixed. The test-class finality finding is withdrawn: newer Checkstyle explicitly forbids final
*Testclasses.
Local style command, exit 0 for both checks:
./mvnw -B -pl database/connector/core,database/connector/dialect/firebird,database/connector/dialect/h2,database/connector/dialect/mariadb,database/connector/dialect/mysql,database/connector/dialect/opengauss,database/connector/dialect/oracle,database/connector/dialect/postgresql,database/connector/dialect/sqlserver,mode/core,proxy/backend/core,test/e2e/operation/transaction spotless:check checkstyle:check -Pcheck -T1C
Both checks selected all 27 changed Java files:
| Owning module | Covered files |
|---|---|
database/connector/core |
DialectDatabaseMetaData.java, DialectTransactionOption.java |
| Connector dialect modules | FirebirdDatabaseMetaData.java, H2DatabaseMetaData.java, MariaDBDatabaseMetaData.java, MySQLDatabaseMetaData.java, OpenGaussDatabaseMetaData.java, OracleDatabaseMetaData.java, PostgreSQLDatabaseMetaData.java, PostgreSQLDatabaseMetaDataTest.java, SQLServerDatabaseMetaData.java |
mode/core |
ContextManager.java, ContextManagerTest.java |
proxy/backend/core |
ProxyDatabaseConnectionManager.java, ProxySQLExecutor.java, StandardDatabaseProxyConnector.java, DeferredMetaDataRefreshContext.java, ProxyBackendTransactionManager.java, ProxySQLExecutorTest.java, StandardDatabaseProxyConnectorTest.java, DeferredMetaDataRefreshContextTest.java, ProxyBackendTransactionManagerTest.java, BeginTransactionProxyBackendHandlerTest.java, CommitProxyBackendHandlerTest.java, SetAutoCommitProxyBackendHandlerTest.java |
test/e2e/operation/transaction |
MySQLDDLMetaDataRefreshTestCase.java, PostgreSQLDDLMetaDataRefreshTestCase.java |
- Checkstyle also selected and passed
test/e2e/operation/transaction/src/test/resources/env/e2e-env.properties; Spotless is Not Applicable to properties. Both checks are Not Applicable toRELEASE-NOTES.mdand bothlimitations.*.mdfiles under the configured formatting scopes and Checkstyle extensions. - Exact-source reactor verification: 149 tests across nine focused classes, zero failures/errors, exit
0. One-amrun ensured dependency freshness. Both isolated probes exited0; physical execution/metadata absence and external persistence were mocked. Docker E2E was not run. - This is a code-scope result. CI was not reviewed; the local style verification above was completed independently.
|
Thanks, both confirmed and addressed in 553a0f3.
Verification: 923 tests pass across the full
|
|
Note on the CI failure ( |
terrymanu
left a comment
There was a problem hiding this comment.
Summary
This PR defers PostgreSQL transactional table-DDL metadata refresh until transaction end and reconciles each affected table against storage. The latest guard fixes the previously reported implicit XA result-set closure. Remaining concerns affect the support contract, transaction cleanup, and documentation.
Result
Review Result: Not Mergeable
Feedback Mode: Needs Discussion
Review Status: Not Converged
Confirmed Blocking Issues: 5
These findings are a confirmed subset. Required ledger/session validation could not finish because the public head commit is unavailable locally.
Blocking Issues
-
[P2] The transactional DDL support contract still needs acceptance
- Evidence: The current documentation introduces LOCAL/XA table-DDL support and transaction-local visibility restrictions. The latest author reply reframes that contract without a subsequent maintainer decision.
- Impact: Sharing a refresh mechanism does not settle the newly supported statement, transaction, storage, and visibility boundaries.
- Discussion Needed: Explicitly accept or adjust those boundaries.
-
[P2] Removing a logical database can prevent transaction cleanup
- Evidence: The deferred queue resolves the database again. If another session has removed it, reconciliation dereferences null, including in its error logger.
- Impact: After deferred DDL and concurrent logical-database removal,
COMMITcan throw an NPE, mask its original failure, and skip clearing transaction state and deferred work. - Discussion Needed: Transaction cleanup must remain guaranteed when queued database metadata disappears.
-
[P2] Early connection release discards cleanup errors
- Evidence: Commit ignores the return value from
closeConnections(false), which returns reset/close failures and clears cached connections. - Impact: Session-variable reset failures disappear before normal command finalization can report them.
- Discussion Needed: Preserve the established cleanup-error channel when deciding the connection-release design.
- Evidence: Commit ignores the return value from
-
[P2] Transaction appendices contradict the new XA support
-
[P2] Added comments violate the written comment standard
- Evidence: The new explanatory line comments violate CODE_OF_CONDUCT.md:71, which permits Javadoc, TODO, and FIXME comments.
- Impact: The additions fail an applicable manual standard despite passing automated style checks.
- Discussion Needed: The retained implementation must satisfy that existing requirement.
Issues 2–4 already existed at the previously reviewed head and were missed earlier. Issue 5 was introduced by the latest commit.
Coverage
- Public head:
feef5064e46dea279ec343abc9729799515cffe7. Both independent assessments inspected all 31 changed files; snapshot contents matched their public blob hashes. - Checkstyle and Spotless passed, exit
0, covering all 27 changed Java files; Checkstyle also covered the E2E properties file. All 164 focused tests passed. The broader dependency build timed out, exit124; narrowed Proxy tests subsequently passed. - Ledger initialization exited
1becausegit merge-baseexited128for the missing head object; session validation remained unavailable. This is a code-scope assessment: CI was not reviewed, and Docker E2E was not run. No source or remote state was changed.
- Skip reconciling a deferred table whose database no longer exists instead of passing null into ContextManager#reconcileTable, which threw an uncaught NPE (including from its own error logger) and skipped the rest of commit's transaction cleanup. - Propagate exceptions returned by closeConnections(false) instead of discarding them, without masking a concurrent commit failure: the original commit exception is kept and the close exception attached via addSuppressed when both occur. - Extract the early-release rationale into a Javadoc'd private method instead of an inline // comment, which CODE_OF_CONDUCT.md's comment standard doesn't permit. - Document PostgreSQL's XA exception for the four table-DDL statements in both transaction appendix docs, which still described the old, fully-restricted behavior. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Thanks, addressed in a19dce6. 1. Support contract still needs acceptance No code action possible here — same as before, flagging it's still open rather than re-arguing it. 2. Removing a logical database can prevent transaction cleanup Confirmed and fixed. 3. Early connection release discards cleanup errors Fixed. 4. Transaction appendices contradict the new XA support Fixed — updated both 5. Added comments violate the comment standard Fixed — extracted the early-release rationale into a Javadoc'd private method ( Verification 207 targeted unit tests pass across |
terrymanu
left a comment
There was a problem hiding this comment.
Summary
This PR defers metadata refresh for PostgreSQL transactional table DDL until the transaction ends, then reconciles metadata against the final storage state. This addresses uncommitted changes being invisible to the refresh connection, but two metadata correctness defects, an unsettled support contract, and manual coding-standard violations remain.
Result
Review Result: Not Mergeable
Feedback Mode: Needs Discussion
Review Status: Not Converged
Confirmed Blocking Issues: 5
These findings are a confirmed subset. Ledger and session validation could not complete because the PR head Git object is unavailable locally.
Blocking Issues
-
[P2] The new transactional DDL support contract still requires maintainer acceptance
- Evidence: The current limitations publish statement, LOCAL/XA, storage, and transaction-local visibility commitments. The latest author reply explicitly states that acceptance remains pending. In addition, the admission logic checks only physical storage capabilities, allowing openGauss-protocol sessions over PostgreSQL storage despite the documented openGauss restriction.
- Impact: Reusing the refresh mechanism does not establish the complete support contract users can rely on.
- Discussion Needed: Explicitly accept or adjust the statement, transaction-type, protocol, storage, and transaction-local visibility boundaries.
-
[P2] Renaming a table to
"dual"omits the destination metadata refresh- Evidence: Deferred refresh collects targets from
TablesContext, which filters every case-insensitive occurrence of DUAL, including real quoted table names. A current-source probe confirmed this filtering. - Impact: With one PostgreSQL storage unit,
BEGIN; ALTER TABLE foo RENAME TO "dual"; COMMIT;queues only the old table. Commit removesfoofrom metadata without registering the renamed table. - Discussion Needed: The accepted rename support must preserve every real DDL target.
- Evidence: Deferred refresh collects targets from
-
[P2] Deferred CREATE loses the information needed to recover long logical index names
- Evidence: Reconciliation passes only existing schemas. The established CREATE refresh implementation also supplies index-name candidates from the statement. A source probe confirmed that names shortened by the identifier-length rewrite cannot be recovered without those candidates.
- Impact: Creating a sharded table with a long named index inside a transaction persists the shortened physical index name in metadata instead of the original logical name.
- Discussion Needed: Deferred refresh must preserve the existing CREATE path’s logical index identity contract.
Issues 2 and 3 already existed at the previously reviewed head,
feef5064…. They were missed in the earlier review and were not introduced by the latest fixes. -
[P2] Four modified expressions violate the line-wrapping rule
- Evidence: The complete expressions at MariaDB:38, openGauss:91, Oracle:85, and PostgreSQL:83 measure 190, 185, 197, and 186 characters respectively, including indentation.
- Impact: They violate the applicable rule requiring modified expressions of at most 200 characters to remain on one line. The automated checks do not enforce this rule.
- Discussion Needed: The retained implementation must satisfy the existing line-wrapping standard.
-
[P2] New exception-propagation tests do not use reference-identity assertions
- Evidence: Test lines 358 and 375 compare the original exception objects using
is(...). The coding standard requiressameInstance(...)for reference identity. - Impact: Runtime behavior is currently equivalent, but the tests do not express the “preserve the original exception object” contract using the required assertion.
- Discussion Needed: The retained tests must satisfy the existing reference-identity assertion standard.
- Evidence: Test lines 358 and 375 compare the original exception objects using
Coverage
- Public PR head:
a19dce6084a9b2e85656b6604388d4a305fc98bf. Two independent manual assessments covered all 33 changed files. Snapshot hashes matched, and the head was rechecked before completion. - Checkstyle and Spotless passed for all 27 Java files; Checkstyle also passed for the properties file. The source dependency build and all 167 selected unit tests passed, with exit code
0. - Ledger initialization exited
1because the missing head object causedgit merge-baseto exit128; session validation remained incomplete. This is a code-scope assessment: CI was not reviewed, and Docker E2E was not run.
…covery - Also require the session's own protocol to support transactional DDL, not just each routed storage unit. A PostgreSQL-protocol check alone let an openGauss-protocol session routed to PostgreSQL storage defer refresh, even though openGauss never sets this capability. - Read the statement's own table attribute instead of TablesContext when collecting deferred tables. TablesContext drops every table named DUAL case-insensitively to exclude the SQL pseudo-table convention, which also silently dropped a real DDL target legitimately named "dual". - Carry a CREATE TABLE statement's declared index-name candidates through to commit-time reconciliation, so a storage-imposed identifier-length limit shortening a long index name can still be recovered the same way the synchronous CREATE path already recovers it. - Merge four DialectTransactionOption constructions onto one line each; all fit within 200 characters. - Use sameInstance() instead of is() for reference-identity assertions. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Thanks, addressed in 1f17062. 1. Support contract still needs acceptance The sub-finding (openGauss-protocol over PostgreSQL storage) is fixed, see point 2 below. The contract itself still needs your sign-off; no further code action possible on my side. 2. Renaming a table to Confirmed and fixed. While fixing this I also closed the gap it pointed at in point 1: 3. Deferred CREATE loses information needed to recover long logical index names Confirmed and fixed. Extracted 4. Four modified expressions violate the line-wrapping rule Fixed — all four 5. New exception-propagation tests should use reference-identity assertions Fixed — both tests now use Verification 213 targeted unit tests pass across |
…idates - Only defer the table a CREATE/ALTER TABLE statement actually targets, not the foreign-key-referenced tables TableSQLStatementAttribute also exposes for binding purposes. A referenced table was never routed by the statement, so it could be reconciled against an arbitrary fallback datasource and, on a miss, incorrectly dropped from meta data. - Replace rather than no-op a deferred table's existing entry when it is added again in the same transaction, so a later statement's revision candidate indexes are not silently discarded in favor of an earlier, stale set for the same table name. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
terrymanu
left a comment
There was a problem hiding this comment.
Correction
Previous Finding or Conclusion: The previous runtime finding that deferred CREATE loses long logical index names.
Current Status: Withdrawn
Reason: The real PostgreSQL CREATE path populates constraintName, but does not produce the indexName read by the index-candidate extraction logic. A current-source probe also confirmed an empty candidate collection. This parser is unchanged from the previously reviewed head, so the earlier conclusion lacked evidence of a reachable production path.
Summary
This PR defers metadata refresh for PostgreSQL transactional table DDL until commit, then reconciles metadata against the final storage state. This addresses the refresh connection’s inability to see uncommitted DDL; the complete support contract and the following design, documentation, and coding-standard issues still need resolution.
Result
Review Result: Not Mergeable
Feedback Mode: Needs Discussion
Review Status: Not Converged
Confirmed Blocking Issues: 4
The findings below are a confirmed subset. Code inspection and local verification finished, but the missing local Git object for the PR head prevented completion of formal ledger and session validation.
Blocking Issues
-
[P2] The new transactional DDL support contract still requires maintainer acceptance
- Evidence: The current limitations promise LOCAL/XA table-DDL support and prohibit referencing a table created earlier in the same transaction. The author’s latest reply explicitly states that acceptance remains pending.
- Impact: The original issue supports fixing metadata refresh after committing ALTER TABLE, but does not settle every newly supported statement, transaction type, or visibility limitation.
- Discussion Needed: Explicitly accept or adjust the statement scope, LOCAL/XA/BASE boundary, protocol and storage requirements, and visibility of newly created tables within the transaction.
-
[P2] The new index payload has no real PostgreSQL CREATE producer
- Evidence: The PostgreSQL visitor populates constraintName, while the index extraction method reads only indexName. The binder does not populate that field.
- Impact: The new public methods, overload, queue field, and cross-module parameters carry only empty collections under the only currently enabled protocol. The associated getCreatedTable helper also introduces an undocumented null-return sentinel.
- Discussion Needed: Establish the actual production requirement for this shared state and API surface. Tests that manually inject nonempty collections do not establish necessity. Existing synchronous-refresh uses in other dialects should remain supported.
-
[P2] The documentation promises a standalone RENAME TABLE statement PostgreSQL cannot execute
- Evidence: All four transaction documents add this claim, including appendix.en.md:10. PostgreSQL’s documented syntax is
ALTER TABLE … RENAME TO; the current-source parser probe rejects standaloneRENAME TABLE. - Impact: A user following the supported-statement list encounters a parsing failure before deferred refresh is reached. This wording already existed at the previously reviewed head and was missed in that review.
- Discussion Needed: The support contract must distinguish internal statement categories from executable PostgreSQL syntax.
- Evidence: All four transaction documents add this claim, including appendix.en.md:10. PostgreSQL’s documented syntax is
-
[P2] The new private helpers are not declared in their caller’s call order
- Evidence: deferMetaDataRefresh calls getRenameSchemaSources first, but the subsequent declarations begin with getDeferrableTables. This violates the explicit requirement in CODE_OF_CONDUCT.md:48.
- Impact: The added method layout does not satisfy the repository’s written standard. Passing automated style checks does not establish compliance with this rule.
- Discussion Needed: The final retained helpers must follow the required declaration order.
Coverage
- Public PR head:
3ce07a804aab0ea0fc33bf6872f501b4a402d454. Two independent code inspections covered all 34 files. Every snapshot blob matched GitHub’s file inventory, and the head remained unchanged before delivery. - All 28 Java files passed Checkstyle and Spotless; the changed properties file passed a separate Checkstyle check. The current-source build and all 173 tests across nine selected classes passed, with exit code 0. The parser probe also passed.
- Ledger initialization exited 1 because the underlying git merge-base command exited 128; session validation remains incomplete. This is a code-scope assessment: CI was not reviewed, and Docker E2E was not run.
… order PostgreSQL has no standalone RENAME TABLE statement; renaming a table goes through ALTER TABLE ... RENAME TO. Reworded limitations.en.md/.cn.md and appendix.en.md/.cn.md to describe that actual syntax instead of a statement category PostgreSQL's parser rejects. Reordered StandardDatabaseProxyConnector's six deferMetaDataRefresh helpers (getRenameSchemaSources, getCreatedTable, getDeferrableTables, getBoundSchemaName, findLogicDataSourceName, getRevisionCandidateIndexes) to match their actual call order, per CODE_OF_CONDUCT.md's private-helper ordering rule. Pure reordering, no logic change. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…fresh-in-transaction # Conflicts: # RELEASE-NOTES.md
CreateTablePushDownMetaDataRefresher.createRevisionCandidateIndexes reads ConstraintDefinitionSegment.getIndexName(), which PostgreSQL's CREATE TABLE grammar never populates: the only rule that sets it (tableConstraintUsingIndex) is reachable only from ALTER TABLE ADD CONSTRAINT ... USING INDEX, never from createTableConstraint. Since deferred refresh currently only applies to PostgreSQL, the revisionCandidateIndexes collection this PR threaded through ContextManager.reconcileTable and DeferredMetaDataRefreshContext was always empty. Removed that plumbing; reconcileTable now calls database.getAllSchemas() directly, matching the removed call's own empty-collection behavior. The underlying mechanism is untouched and still serves MySQL's synchronous refresh path, where it has a real producer. Assisted with AI Claude (Claude Code). Affected files: ContextManager.java, StandardDatabaseProxyConnector.java, DeferredMetaDataRefreshContext.java and their tests. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Addressed the remaining items: Index-payload plumbing (item 2): removed. Traced PostgreSQL's actual grammar — Doc wording (item 3): fixed — Helper declaration order (item 4): fixed — Item 1 (the overall transactional-DDL support contract) is still open for your/maintainer sign-off. Assisted with AI Claude (Claude Code). Affected files: 🤖 Generated with Claude Code |
terrymanu
left a comment
There was a problem hiding this comment.
Summary
This PR addresses metadata refresh being unable to see uncommitted PostgreSQL DDL through a separate connection. It records affected tables, reconciles metadata against the actual storage state after a commit attempt, and restricts eligibility by protocol, storage capability, and transaction type. The mechanism addresses the identified root cause, but the support contract and the following design and standards issues remain unresolved.
Result
Review Result: Not Mergeable
Feedback Mode: Needs Discussion
Review Status: Not Converged
Confirmed Blocking Issues: 4
The findings below are a confirmed subset. Two independent code inspections completed, but the missing local Git object for the PR head prevented completion of formal ledger and session validation.
Blocking Issues
-
[P2] The transactional DDL support contract still requires maintainer acceptance
- Evidence: The current limitations promise table-DDL support for LOCAL/XA transactions while preventing subsequent statements from referencing tables created within the same transaction. The author’s latest reply explicitly states that the overall contract still awaits maintainer sign-off.
- Impact: The supported statements, transaction types, protocol/storage combinations, and visibility boundaries users can rely on remain unsettled.
- Discussion Needed: Explicitly accept or adjust these support boundaries.
-
[P2] Public helper methods remain without cross-class consumers after removal of the index payload
- Evidence: The two CREATE helper methods were changed from private methods to
public staticmethods. Their only current caller is the same class’srefreshmethod; deferred refresh no longer calls them. - Impact: The newly exposed public boundary has no current production consumer requiring it, contrary to the minimum-access requirement. The existing synchronous index-recovery behavior itself remains necessary.
- Discussion Needed: Establish whether these two internal computations need to become public contracts.
- Evidence: The two CREATE helper methods were changed from private methods to
-
[P2] Two added or modified Java constructs violate the line-wrapping rules
- Evidence: The CREATE helper declaration occupies three lines, although its first two lines total only 189 characters and the declaration fits in two lines. The complete test initialization statement is 184 characters long.
- Impact: These constructs violate the current written wrapping rules, which Checkstyle and Spotless do not fully enforce. Both issues existed in the previously reviewed version and were missed in that review.
- Discussion Needed: The retained code must satisfy the current minimum-line-break rules.
-
[P2] Added ordinary Javadocs contain implementation explanations prohibited by the current rules
- Evidence: The private helper’s Javadoc expands into implementation rationale and steps, contrary to the current Javadoc rules. Similar added paragraphs appear in ContextManager, the CREATE refresher, DeferredMetaDataRefreshContext, ProxyBackendTransactionManager, and both new E2E classes.
- Impact: These ordinary internal declarations do not meet the current requirement for concise responsibility descriptions.
- Discussion Needed: The final documentation should preserve necessary contracts while complying with the current Javadoc wording rules.
Coverage
- Public PR head:
01ef8ba932050efcc0e56fafae5dd4b19c516dfa. Two independent source inspections covered all 34 files. The head and discussion were rechecked and remained unchanged before delivery. - Checkstyle covered 28 Java files and the properties file; Spotless covered all 28 Java files. Both exited
0. All 176 tests across 10 focused test classes passed, with zero failures or errors. - Ledger initialization exited
1because the underlyinggit merge-baseexited128for the missing head object; session validation exited1. This is a code-scope assessment: CI was not reviewed, and Docker E2E was not run.
…ort wrapped line Revert CreateTablePushDownMetaDataRefresher to upstream now that nothing calls its revision-candidate helpers, reduce the Javadocs added by this PR to concise responsibility descriptions, and join a test statement that fits within 200 characters. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Thanks, addressed in 2f3ca9b. [P2] Public helper methods without cross-class consumers
[P2] Line-wrapping violations The CREATE helper declaration is gone with the revert. The test initialization in [P2] Javadocs with implementation explanations The Javadocs this PR adds in [P2] Transactional DDL support contract No code change. This still needs maintainer acceptance of the support boundaries in 🤖 Generated with Claude Code |
terrymanu
left a comment
There was a problem hiding this comment.
Summary
This PR addresses metadata refresh being unable to see uncommitted PostgreSQL DDL through a separate connection. It records affected tables and reconciles metadata against the final storage state during commit. The mechanism addresses the reported problem, but the support contract, E2E polling behavior, and one newly introduced fallback still need resolution.
Result
Review Result: Not Mergeable
Feedback Mode: Needs Discussion
Review Status: Not Converged
Confirmed Blocking Issues: 3
The following findings are a confirmed subset. Formal ledger and session validation could not complete.
Blocking Issues
-
[P2] The transactional-DDL support boundaries still require maintainer acceptance
- Evidence: The current limitations promise table-DDL support for LOCAL/XA transactions while prohibiting references to tables created earlier in the same transaction. The latest author reply explicitly states that these boundaries still await acceptance.
- Impact: The supported statements, transaction types, protocol/storage combinations, and transaction-local visibility contract remain unsettled.
- Discussion Needed: Explicitly accept or adjust these support boundaries.
-
[P2] SQL exceptions during normal metadata convergence prematurely terminate the new E2E polling
- Evidence: The PostgreSQL test:117 and MySQL test:67 directly poll queries that can throw SQLException. Source tracing and probes against the current dependencies confirm that Awaitility propagates the first exception.
- Impact: After DROP COLUMN, before Cluster metadata catches up, the logical column count can differ from the physical result set. The resulting query error can fail a correct implementation before the 30-second wait expires. This is a conditional failure established from source and probes; Docker reproduction was not performed.
- Discussion Needed: The acceptance checks must tolerate normal asynchronous convergence while preserving timeout failures. A query exception must not count as evidence that the column has been removed.
-
[P2] The new empty-collection fallback has no supported missing-attribute condition
- Evidence: The remaining paths at StandardDatabaseProxyConnector.java:388 accept only DROP/RENAME statements. Both final statement types guarantee TableSQLStatementAttribute through their constructors.
- Impact: No production condition justifies the empty-collection fallback, contrary to the applicable defensive-code rules. This is a standards violation, not a claim of an observed runtime failure.
- Discussion Needed: The final implementation should follow the existing required-attribute contract.
Issues 2 and 3 already existed at the previously reviewed head, 01ef8ba9…, and were missed in that review.
Coverage
- Public PR head:
2f3ca9b666e6e008588163af03b7a35a1fab4c56. Two independent source assessments covered all 33 files. The head was rechecked before delivery and remained unchanged. - Checkstyle and Spotless passed for all 27 Java files; Checkstyle also passed for the changed properties file. All 174 focused unit tests passed against current sources, with exit code 0.
- E2E
test-compileexited 1 before compilation because snapshot dependencies were missing; Docker E2E was not run. The missing local head Git object caused ledger initialization to exit 1, with the underlying git merge-base exiting 128; session validation also exited 1. This is a code-scope assessment; CI was not reviewed.
…metadata Read TableSQLStatementAttribute through getAttribute for drop and rename statements, which always carry it, and make the DDL metadata refresh E2E cases ignore transient query errors while waiting for metadata to converge. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Thanks, addressed in 8ef0445. [P2] SQL exceptions during metadata convergence end the E2E polling early
[P2] Empty-collection fallback without a supported missing-attribute condition
[P2] Transactional DDL support contract No code change. This still needs maintainer acceptance of the support boundaries in 🤖 Generated with Claude Code |
terrymanu
left a comment
There was a problem hiding this comment.
Summary
This PR records affected tables and reconciles metadata against the final storage state during commit, addressing PostgreSQL transactional DDL being invisible to a separate metadata-refresh connection before commit. The latest commit fixes the exception-polling and empty-collection fallback findings. The support contract and the following design and standards issues remain unresolved.
Result
Review Result: Not Mergeable
Feedback Mode: Needs Discussion
Review Status: Not Converged
Confirmed Blocking Issues: 3
The findings below are a confirmed subset. Ledger and session validation remain incomplete, so formal review completion cannot be claimed.
Blocking Issues
-
[P2] The transactional-DDL support boundaries still require maintainer acceptance
- Evidence: The current documentation promises LOCAL/XA table-DDL support while preventing subsequent statements from referencing tables created within the same transaction. The author’s latest reply explicitly states that these boundaries still await acceptance.
- Impact: Previously rejected operations become a new user-facing contract. Sharing a refresh mechanism does not establish project acceptance.
- Discussion Needed: Accept or adjust the supported statements, transaction types, storage requirements, and transaction-local visibility limitations.
-
[P2] The standalone RenameTableStatement deferral path has no enabled production dialect
- Evidence: PostgreSQL’s rename parsing produces an
AlterTableStatement. The added standalone rename branch is exercised only by a test that mocks transactional-DDL capability for MySQL. - Impact: This added path and its dedicated test serve hypothetical dialect support, contrary to the repository’s rule against speculative reuse.
- Discussion Needed: Establish whether this additional path has a real, accepted support requirement.
- Evidence: PostgreSQL’s rename parsing produces an
-
[P2] One fluent expression violates the explicit line-wrapping rules
- Evidence: The complete expression at ContextManager.java:301–302 is 210 characters long, but keeping
.stream()on the first line would make that line only 124 characters. The current break violates the requirement to retain complete chain operations on the preceding line when they fit. - Impact: The code does not satisfy an applicable written standard. Checkstyle and Spotless do not enforce this requirement.
- Discussion Needed: The final candidate must still satisfy this established standard.
- Evidence: The complete expression at ContextManager.java:301–302 is 210 characters long, but keeping
Issues 2 and 3 were already present at the previously reviewed head, 2f3ca9b6…, and were missed in that review.
Coverage
- Public head:
8ef044599f445d30ba4566d3436dd8be466e9bdd. Two independent source assessments covered all 33 files, followed by coordinator verification of the findings above. - Checkstyle and Spotless passed for all 27 Java files with exit code
0. The separate Checkstyle run for the changed properties file also exited0. File-selection coverage was verified. - Ledger initialization exited
1because the public-head object is unavailable locally; the underlyinggit merge-baseexited128. Session validation exited1. Unit and E2E tests were not run in this round. This is a code-scope assessment; CI was not reviewed.
No dialect that supports transactional DDL produces a standalone RenameTableStatement, so drop its deferral branch and dedicated test, and keep stream() on the first line of the routed-table check in ContextManager. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Thanks, addressed in 330c260. [P2] Standalone I removed the [P2] Line-wrapping violation in
[P2] Transactional DDL support contract No code change. This still needs maintainer acceptance of the support boundaries in 🤖 Generated with Claude Code |
terrymanu
left a comment
There was a problem hiding this comment.
Correction
Previous Finding or Conclusion: The transactional-DDL support boundary remains unresolved.
Current Status: Retained.
Reason: The earlier formal review missed that the visibility limitation also affects new columns on existing tables. This was already present at the same reviewed head.
Summary
This PR addresses metadata-refresh connections being unable to see uncommitted PostgreSQL DDL. Because the reported issue requires bypassing an existing restriction, the patch also introduces new supported transaction-DDL paths. Reconciling final storage state after commit is reasonable, but it does not provide transaction-local visibility of changed structures.
Result
Review Result: Not Mergeable
Feedback Mode: Needs Discussion
Review Status: Not Converged
Confirmed Blocking Issues: 2
The following findings are a confirmed subset. Canonical ledger and session validation could not complete because the PR head Git object is unavailable locally.
Blocking Issues
-
[P2] Define transaction-local visibility before enabling table-DDL support
- Evidence: The refresh branch defers metadata changes until commit. Subsequent statements still bind against global metadata, where unknown columns are rejected.
- Impact: For an existing
t(id INT),BEGIN; ALTER TABLE t ADD COLUMN c INT; INSERT INTO t(id,c) VALUES (1,1); COMMIT;reaches old-schema column validation before commit. This is established by source tracing; no live reproduction was run. The documented exception explicitly mentions newly created tables, so it understates the limitation. - Discussion Needed: Agree whether support limited to post-commit metadata convergence is acceptable, including restrictions on later statements using changed structures. The author still leaves this acceptance pending. If transaction-local visibility is required, the present mechanism is insufficient.
-
[P2] Newly introduced normal-throughput helpers lack required annotations
- Evidence: New connector helpers run for ordinary SQL. The new commit helper and queue
isEmpty/clearmethods run with normal transaction throughput. None has an applicableHighFrequencyInvocationannotation, as required by CODE_OF_CONDUCT.md:56–61. - Impact: This violates the written annotation requirement. No measured performance regression is claimed.
- Discussion Needed: Any retained implementation must satisfy the existing annotation contract.
- Evidence: New connector helpers run for ordinary SQL. The new commit helper and queue
Coverage
- Public head:
330c2608dcab7867f2e9f36bcdce3c920d2f91ea. All 33 changed files were re-inspected; the head and public discussion remained unchanged. - Prior local Checkstyle and Spotless checks passed across all 12 affected modules, exit
0. Results were reused after verifying unchanged candidate, configuration, tools and coverage of all 27 Java files; Checkstyle also covered the changed properties file. - Canonical inventory and ledger initialization exited
1, with underlyinggit merge-baseexit128for the missing head object. Session validation remains incomplete. This is a code-scope assessment: unit/E2E tests were not run, and CI was not reviewed.
…ity limit Mark the deferrable-DDL check, the commit-time reconcile guard and the deferred queue isEmpty/clear as high-frequency, and state in the limitations pages that any structure changed by DDL earlier in the same transaction, including new columns of existing tables, is not visible to later statements. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Thanks, addressed in e0b1b18. [P2] Define transaction-local visibility before enabling table-DDL support This PR supports metadata convergence at commit only. It does not provide transaction-local visibility, and I am proposing that as the supported scope. Statements later in the same transaction bind against the metadata as it was before the transaction's DDL, whether the DDL created a table, added a column to an existing table, or renamed a table. The If you would prefer transaction-local visibility, I can open that as a separate design discussion. It needs a different mechanism from this deferred reconcile. [P2] Newly introduced normal-throughput helpers lack required annotations
🤖 Generated with Claude Code |
Fixes #35166.
Changes proposed in this pull request:
Meta data refresh runs immediately after execute, over a new physical connection, so it cannot see DDL that the current transaction has not committed yet. This PR defers the refresh to commit.
DeferredMetaDataRefreshContext, a transaction-scoped queue of pending push down refreshes held byProxyDatabaseConnectionManager. It stores the database name rather than aShardingSphereDatabasereference, so the database is re-resolved when the refresh actually runs.StandardDatabaseProxyConnector#doExecutenow enqueues the refresh when the session is in a transaction, and refreshes immediately otherwise. The existingDDLCommitPolicy.COMMIT_CURRENT_TRANSACTIONpath is unchanged: it commits first, so the refresh still runs immediately.ProxyBackendTransactionManagerdrains the queue after the underlying commit succeeds and before the connection context is cleared, discards it on rollback, records the queue position onSAVEPOINT, and rolls back to that position onROLLBACK TO SAVEPOINT.isSupportMetaDataRefreshInTransactiontotruefor PostgreSQL.ProxySQLExecutor#checkExecutePrerequisitesrejects metadata-changing DDL in a transaction while that flag isfalse, so the deferral mechanism and the flag have to change together.Notes on scope:
ProxyBackendTransactionManager#commitis the single commit entry point for all three transaction types, with the local/distributed split inside it, so the deferral is transaction-type agnostic. PostgreSQL already declaredisSupportDDLInXATransaction = true, so this adds no new claim about XA beyond making the refresh correct.DropTablePushDownMetaDataRefresherremoves the table from meta data purely from the statement rather than reloading it, so keeping a rolled-backDROP TABLEin the queue would delete a still-existing table from meta data.DriverJDBCPushDownExecuteExecutorandDriverJDBCPushDownExecuteUpdateExecutorhave the same immediate-refresh shape, so ShardingSphere-JDBC appears to have the analogous behaviour. They never readisSupportMetaDataRefreshInTransaction, so this PR does not change them. Happy to open a separate issue if you would like that covered.Tests:
DeferredMetaDataRefreshContextTestcovers the queue and savepoint semantics.ProxyBackendTransactionManagerTestcovers the drain ordering relative to commit, the discard on rollback, and the savepoint mark and rollback wiring.StandardDatabaseProxyConnectorTestcovers deferring instead of refreshing while in a transaction.PostgreSQLDDLMetaDataRefreshTestCaseis a transaction E2E case running theBEGIN/ALTER TABLE ADD COLUMN/COMMITsequence from the issue against Proxy, asserting the new column becomes visible without a manualREFRESH TABLE METADATA, and that a rolled back column does not. It compiles locally but I have not run the Docker-backed E2E suite on my machine, so please treat CI as the authority for it.Local verification:
./mvnw -pl proxy/backend/core,database/connector/dialect/postgresql test— 597 tests, 0 failures../mvnw -pl proxy/backend/core,database/connector/dialect/postgresql spotless:check checkstyle:check -Pcheck— 0 violations../mvnw apache-rat:check -Pcheck— passed.Before committing this PR, I'm sure that I have checked the following options:
./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e. I ran the targeted module builds, style checks and RAT listed above rather than the full reactor build; please let me know if you would like the full build result before review.AI assistance disclosure, per
AI_POLICY.md: this change was assisted by AI (Claude Code), covering the investigation, implementation and tests across all files in this PR, under my review and with the verification listed above.