Skip to content

fix(同步CRUD): 贯通默认事件上下文 - #128

Merged
zhou-hao merged 1 commit into
4.2from
codex/sync-crud-event-context
Oct 12, 2026
Merged

zhou-hao merged 1 commit into
4.2from
codex/sync-crud-event-context

Conversation

@zhou-hao

@zhou-hao zhou-hao commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

同步仓储的 update/delete 未传递默认事件上下文;同步 before/after 又各建一个上下文,导致 before 中保存的实体快照在 after 丢失。框架同步树删除因此无法触发正式 DeletedEvent,监听器拒绝操作时未能按预期回滚。

同步 update/delete 复用仓储默认 keys;每次同步执行使用独立 EventContext,贯穿 before、SQL result、after 和 error。错误通知失败保留原异常并附加 suppressed 异常。保留既有公开构造器的二进制描述符,响应式 holder 链保持原有行为。

验证:5 个 suite、18/18 通过。新增 11 项真实 H2/JDBC 回归,覆盖 update/delete、单条与批量 insert/save 的正式 mapping 事件、监听器和 SQL 失败回滚、调用方写入回滚、重复执行隔离、原异常身份及旧构造器。下游框架 112 项、组件 177 项、认证 36 项在最终本地制品下集中验证通过(框架 1 项既有跳过,0 failure/error)。

已由维护者合入 4.2,合并提交 23c82a3cfafd11d2e754246862b74c11b33c0005。自动发布成功,Nexus 提供 4.2.2-20261012.023335-44。依赖该快照的 框架 #370 CI 重跑通过,framework 源码和回归测试未修改。框架修复快照仍须合入并发布,供后续消费者使用。

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 82.85714% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.17%. Comparing base (68b2764) to head (038943c).
⚠️ Report is 56 commits behind head on 4.2.

Files with missing lines Patch % Lines
.../ezorm/rdb/mapping/events/EventResultOperator.java 75.00% 3 Missing and 2 partials ⚠️
...mework/ezorm/rdb/metadata/TableOrViewMetadata.java 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##                4.2     #128       +/-   ##
=============================================
+ Coverage     64.92%   79.17%   +14.24%     
- Complexity     2341     3441     +1100     
=============================================
  Files           343      376       +33     
  Lines          9375    11045     +1670     
  Branches        940     1341      +401     
=============================================
+ Hits           6087     8745     +2658     
+ Misses         2810     1652     -1158     
- Partials        478      648      +170     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@zhou-hao
zhou-hao merged commit 23c82a3 into 4.2 Oct 12, 2026
1 check passed
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