fix: 独享租约仅锁定单个账号 - #3
Merged
Merged
Conversation
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.
同一号池原先被一个用户整组锁定,其他用户即使面对多个空闲账号也会收到 pool_busy。现在每位用户仅独占授权组内一个账号,固定一小时,重试和后续请求不换号;8 个可用账号可分配给 8 位用户。
持久化升级为 v2,读取旧整组租约后保留原到期时间,并在原用户下一次安全请求时收窄为单账号。无法确定旧账号的 previous_response_id 请求要求重开会话。管理接口返回账号 ID 与租约粒度,配套前端逐账号展示。
验证:go test ./...、相关包 race 测试、服务构建及真实管理 API 冒烟通过。包含同组 8 用户并发、同用户复用、跨组/跨账号隔离、旧状态迁移及持久化失败回滚测试。未更新线上服务。