You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "FlyingZC (via GitHub)" <gi...@apache.org> on 2026/08/14 02:15:48 UTC

[PR] Fix nested transaction outcome assertions [shardingsphere]

FlyingZC opened a new pull request, #39450:
URL: https://github.com/apache/shardingsphere/pull/39450

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix nested transaction outcome assertions [shardingsphere]

Posted by "FlyingZC (via GitHub)" <gi...@apache.org>.
FlyingZC commented on PR #39450:
URL: https://github.com/apache/shardingsphere/pull/39450#issuecomment-5288676768

   ### Summary
   
   **Review Result: Mergeable**
   
   Reason: 此结论仅覆盖代码范围。最新 head 在保留事务完成后同一逻辑连接断言的同时,增加了独立连接的最终外部可见结果断言,并在两次断言完成后清理数据;未发现代码级阻塞问题。CI not reviewed by request.
   
   ### Evidence
   
   - PR [#39450](https://github.com/apache/shardingsphere/pull/39450) 的最新 head 为 `d21f53159a88ef6ecc0ae3134ae006deacd37111`,GitHub 权威文件清单与本地 triple-dot 范围一致,均只修改 `NestedTransactionTestCase.java`。
   - `NestedTransactionTestCase.java:51-120` 为四种 outer/inner commit/rollback 组合分别复用同一组期望余额:
     - outer commit + inner rollback:`1, 2, 3, 4, 7, 8`
     - outer rollback + inner rollback:`3, 4`
     - outer commit + inner commit:`1, 2, 3, 4, 5, 6, 7, 8`
     - outer rollback + inner commit:`3, 4, 5, 6`
   - 每个场景先在完成 commit/rollback 后的原逻辑连接上断言,并通过 `setAutoCommit(true)` 正常结束后续只读事务;随后关闭原连接。
   - `NestedTransactionTestCase.java:123-127` 使用新的独立连接再次断言最终可见结果,断言成功后才执行清理,避免清理操作掩盖外部事务结果。
   - Case 仍限定为 JDBC LOCAL,并保留既有独立 JDBC 连接语义;没有修改生产代码、事务实现或公共契约。
   - 最新 PR 树对应的本地验证全部通过:
     - `./mvnw spotless:apply -Pcheck -T1C`
     - `./mvnw checkstyle:check -Pcheck -T1C`
     - transaction 模块 `test-compile`
     - MySQL 5.7 JDBC LOCAL:1/1
     - PostgreSQL 12 JDBC LOCAL:1/1
     - openGauss 3.1.0 JDBC LOCAL:1/1
   
   ### Review Details
   
   - Review Focus: Code Correctness Review — CI not reviewed by request.
   - Reviewed Scope: `NestedTransactionTestCase.java`;latest head `d21f53159a88ef6ecc0ae3134ae006deacd37111`;base SHA `d01bfff6636224206f37e9c37bd6db7b630921ad`;local merge-base `840c9f080dc0f39bb18c74d39543002205bbbb60`;本地与 GitHub 文件清单完全匹配。
   - Not Reviewed Scope: GitHub Actions、check-runs 和 workflow logs;Proxy、XA、BASE 以及未修改的生产事务实现不属于本 PR 的行为范围。
   - Verification: Spotless、Checkstyle、transaction `test-compile` 和三个数据库的 JDBC LOCAL 聚焦 E2E 均以退出码 0 完成;3 tests、0 failures、0 errors。
   - Release Note / User Docs: 不需要;该 PR 仅增强现有内部 E2E 断言,不改变用户可见行为、配置、API、SPI 或兼容性。
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix nested transaction outcome assertions [shardingsphere]

Posted by "FlyingZC (via GitHub)" <gi...@apache.org>.
FlyingZC merged PR #39450:
URL: https://github.com/apache/shardingsphere/pull/39450


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org