Skip to content

fix: 四个 SEQUENCE 主键实体显式声明序列名并固化 allocationSize=50,兼容达梦手工预建序列 - #214

Merged
xlorne merged 2 commits into
mainfrom
dev
Aug 17, 2026
Merged

fix: 四个 SEQUENCE 主键实体显式声明序列名并固化 allocationSize=50,兼容达梦手工预建序列#214
xlorne merged 2 commits into
mainfrom
dev

Conversation

@xlorne

@xlorne xlorne commented Aug 17, 2026

Copy link
Copy Markdown
Contributor
  • FlowRecord/FlowTodoRecord/FlowTodoMarge/SubProcessRecord 显式 @SequenceGenerator, 序列名固定为 t_<表名>_seq,不再依赖 Hibernate 隐式命名(避免因 db_structure_naming_strategy 或方言差异导致序列名推导不一致、Hibernate 找不到序列)
  • allocationSize 固定 50,与序列 INCREMENT BY 严格一致,规避 pooled 优化器主键重复
  • application-dm.properties 补充达梦序列部署约定:ddl-auto=update 在达梦自动建序列不可靠, 需手工预建;起始值按表是否有历史数据设置(空表 start with 1,有数据 start with max(id)+1)

xlorne and others added 2 commits August 17, 2026 22:30
- FlowRecord/FlowTodoRecord/FlowTodoMarge/SubProcessRecord 显式 @SequenceGenerator,
  序列名固定为 t_<表名>_seq,不再依赖 Hibernate 隐式命名(避免因 db_structure_naming_strategy
  或方言差异导致序列名推导不一致、Hibernate 找不到序列)
- allocationSize 固定 50,与序列 INCREMENT BY 严格一致,规避 pooled 优化器主键重复
- application-dm.properties 补充达梦序列部署约定:ddl-auto=update 在达梦自动建序列不可靠,
  需手工预建;起始值按表是否有历史数据设置(空表 start with 1,有数据 start with max(id)+1)

Co-Authored-By: Claude <noreply@anthropic.com>
- 提供 t_flow_record/t_flow_todo_record/t_flow_todo_marge/t_flow_sub_process_record
  四张 SEQUENCE 主键表的建序脚本
- 幂等可反复执行;START WITH 自动取 表 max(id)+1,表空为 1,规避撞历史主键
- INCREMENT BY 固定 50,与实体 allocationSize=50 严格一致,避免 pooled 优化器主键重复

Co-Authored-By: Claude <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.03%. Comparing base (2d5eee2) to head (4d74edb).
⚠️ Report is 30 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #214   +/-   ##
=========================================
  Coverage     73.03%   73.03%           
  Complexity     1589     1589           
=========================================
  Files           226      226           
  Lines          6715     6715           
  Branches        728      728           
=========================================
  Hits           4904     4904           
  Misses         1457     1457           
  Partials        354      354           

☔ 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.

@xlorne
xlorne merged commit f7d68f2 into main Aug 17, 2026
3 checks 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.

1 participant