避免支付宝账单在增量同步期间反复全表计数 #142
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/WuYongJie-live-mirror-count"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
支付宝账单在增量同步期间会退回大表 COUNT,生产首页查询超过 15 秒。同步批次现在在同一事务内根据已存在主键数维护准确行数,新增记录增加计数、更新不增加;页面仅复用明确标记准确的计数,不使用数据库估算值。旧版进行中的计数保持不可信,完成一次同步后再启用。
新增状态表布尔标记迁移,兼容未迁移表。目标测试 18 项 / 96 断言通过,补充验证增量完成不全表计数、旧状态与失败全量路径 3 项 / 17 断言通过;覆盖新增、更新、事务回滚、旧状态及页面计数。无金额计算、权限或上游写入变更。