Repository navigation
feat(gateway): Qoder 消费记录按会话聚合 - #222
Open
mfkeeq199458 wants to merge 1 commit into
Open
mfkeeq199458 wants to merge 1 commit into
mfkeeq199458 wants to merge 1 commit into
Conversation
同一区域、账号与会话键的多轮请求复用同一个 business id、begin_at 与 name,使上游用量明细按会话聚合。 锚点表按区域和 uid 隔离,带 TTL 与摊销 GC;新增单测与 Qoder 网关端到端用例覆盖同会话复用及跨会话隔离。
This branch has not been deployed
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.
背景
Qoder 上游按
business聚合消费明细。网关此前每个请求都生成新的business.id与begin_at,同一次会话会被拆成多条<1min记录。变更
qoder/business.rs,按(区域, uid, 会话键)缓存并复用business.id / begin_at / name。payload::sticky_identity_for_request,同会话跨轮命中同一锚点。StickyTable同口径。验证
cargo fmt --all -- --checkcargo test -p buddy-switch-gateway --test qoder_gateway_e2e:22/22 通过说明
本 PR 只处理共享会话键的请求聚合。Qoder 客户端在主对话之外产生的旁路请求没有共享主会话键,仍会各自形成独立记录。