Repository navigation
fix: 减少已退休分组调度重建的重复生命周期协调 - #778
Merged
Merged
Conversation
Refs #711。仅复用单次 bucket 准备内已完成的 inactive/missing 协调,保留逐桶 epoch 捕获、失败重试和后续调用 fresh 权威读取。补确定性回归与远端 expected-RED;本地仅格式化和静态 diff 检查。
ranxi2001
marked this pull request as ready for review
November 10, 2026 13:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
解决的问题与行为变化
account_changed,payload 指向已停用/删除且 bucket 已退休的旧分组。准备 B 个退休 bucket 时,每个 bucket 都重新获取生命周期租约、fresh 查询分组、读取注册表并退休整组,重复 B 轮。prepareBucketWriteTasks仅复用已成功完成的 inactive/missing 整组协调,将该组权威读取、注册表读取、租约获取由 B 次降到 1 次,全组退休由 B 轮降到 1 轮。每桶仍先 Capture;并发 reopen、epoch fencing、首个错误与失败重试继续生效。本次增量(勾选仅代表实现/回归源码已提交):
#711 原始关闭范围(均继续待办):
关联记录与来源
production@b677bb176ae66e67ed09919756c10f1b0ae2ac0f;head:fix/issue711-next-increment-20261110@7a36cc77fccd4a0be41f5ed00d25e2d44bf5bf02;无 stacked 依赖。production的 CONTRIBUTING.md 与 PR 模板;读取时 production 仍为上述基线。管理员新功能提示
复现与验收
group_ids的缺失账号account_changed。prepareGroupLifecycle;预期旧 blob 在指定计数断言失败,尚无实际 RED 日志。backend/internal/service/scheduler_snapshot_retired_group_batch_test.go。未覆盖线上性能、网络延迟下吞吐或原 Issue 全部关闭条件。协议、调度或传输改动补充
account_changed(account_id=101, group_ids=[711]),账号不存在,组不存在或停用,全部 canonical 桶已 retired。实际验证
gofmt -w backend/internal/service/scheduler_snapshot_service.go backend/internal/service/scheduler_snapshot_retired_group_batch_test.gogofmt -l backend/internal/service/scheduler_snapshot_service.go backend/internal/service/scheduler_snapshot_retired_group_batch_test.gogit diff --check、git diff --cached --checkgo test -race -tags=unit ./internal/service -run '^TestSchedulerRetiredGroupBatch' -count=1 -vgo test -race -tags=unit ./internal/service ./internal/repository -run '^(TestSchedulerPublicationLockRoundTripAndRollback|TestSchedulerPublicationDiagnostics|TestSchedulerSnapshotUsesLatestCompleteAccounts|TestSchedulerSnapshotIDRetryFiltersLatestMembership|TestSchedulerOutboxRetry|TestSchedulerRetiredGroupBatch|TestSchedulerGroupLifecycle|TestSchedulerPrepareGroupLifecycle|TestSchedulerRebuildBatch|TestSchedulerBulkAccountEvent|TestSchedulerFullRebuild|TestSchedulerRebuildRetireAfterDBLoadFencesPublish)' -count=1 -v -timeout=5m|为 Markdown 转义,实际正则为普通 `go test -race -tags=unit ./internal/service -run '^TestSchedulerRetiredGroupBatchReconcilesOnce$' -count=1 -v -timeout=5m20f7505e699aaf8853da320f3d11ac182e69e2a7;须非零退出并匹配指定 FAIL 和 authority 计数诊断,拒绝 compile/setup/skip/panic/race 错误go test -race -tags=integration ./internal/integration/issue711 -run '^TestIssue711' -count=1 -v -timeout=5m上表记录 writer 冻结时的本地执行状态,所有“未运行”均指本机;远端实际执行结果以紧接下节的精确新头证据为准。源码已由父级审阅并普通推送,Draft #778 已创建。
当前精确头验收(上表为初始冻结记录)
c5c0b12df8450644bbf3f9fa37bb1cbdf0efe5bc,专项 run 42822636805 四项 job 全部 completed/success。父级独立下载原始 job 日志及四份 artifact,核对候选 SHA、基线 blob 和退出码,并程序重算测试结果。unit-green.log69 个顶层 PASS(包含新增4项;不重复相加),integration.log4 个顶层 PASS,无失败/跳过/race 警告。使用真实生产 repository/service adapters、PG18 和双独立 Redis;仍为合成环境,不是生产故障复现。b677bb17…的精确 service blob20f7505e699aaf8853da320f3d11ac182e69e2a7;missing/inactive × main/retry 四个指定子反例均出现 authority 重复读取断言失败,原始退出码1。没有把编译/fixture失败当行为RED。7eb2e271…对应精确 production blob,各指定集成反例实际失败、退出码1,无跳过;保留旧一致性/争用保护。7a36cc77…CLEAR;父级核新合并父提交、4个相关文件 blob 一致与范围未扩张,接续其源码结论。新头所有 push/PR checks/statuses、最新 base 与合并门禁仍待完成,不借旧头结果。兼容性与运行影响
文档与用户可见变化
更新
docs/scheduler-publication-contention.md,区分本次已完成源码/CI 接线与全部原始关闭门槛。无 UI 改动,截图不适用。提交、PR、合并与上线状态分别记录;当前仅本地提交。Agent 使用声明
batch_audit:只读生产路径、安全边界及回归 fixture 审查;未写文件。ci_audit:只读 CI、验收清单及回归/编译接口静态审查;未写文件。gpt-6.1-sol/ultra:父级已读取各自线程索引与 actualturn_context核验;fast 仅 requested,effective tier 未确认。gpt-6.1-sol,推理强度未知(运行时未提供);负责范围、源码差异、模板、元数据、发布及远端核验。gpt-6.1-sol/ultra,actualturn_context已核;固定7a36cc77…静态审查已完成 CLEAR。新整合头与该头的四个相关文件逐个 blob 相同;只读合并检查通过,仍待新头远程动态验收。提交前自查