Repository navigation
fix(billing): make group rate and RPM synchronization atomic - #81
Open
xiaoguai1818 wants to merge 2 commits into
Open
xiaoguai1818 wants to merge 2 commits into
xiaoguai1818 wants to merge 2 commits into
Conversation
xiaoguai1818
marked this pull request as ready for review
November 17, 2026 09:55
Author
|
已核实最终 SHA 4fbcb63 的目标仓库 CI 全部通过,包括 Go unit/integration、Frontend、Shell、golangci-lint;后端与前端 Security Scan 均通过。此次变更对分组费率及 RPM 的批量同步实施事务回滚,补充 PostgreSQL 外键写入失败后的原数据保留回归,未修改 schema 或计费政策。PR 已转 Ready,烦请维护者复审;未合并、发布或部署。 |
xiaoguai1818
pushed a commit
to xiaoguai1818/sub2api
that referenced
this pull request
Nov 21, 2026
Record fork Actions HTTP 422 despite enabled API status, pending required CI/Security Scan, and overlapping existing lite PRs CherryLover#73-CherryLover#81. Do not claim the single consolidated PR is review-ready until the final SHA checks can actually run.
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.
Problem
Group-level rate multiplier and RPM synchronization performed multiple destructive UPDATE/DELETE/INSERT statements outside one transaction. A subsequent insert error could leave configuration partially deleted; duplicate IDs could break UPSERT.
Fix
Each sync now uses a SQL transaction, rolling back on any failure and committing on success. Duplicate user IDs use last-value-wins; rate and RPM fields remain independent. No schema migration or pricing-policy change.
Origin
Selective backport Wei-Shaw#8659, commit 98a44ba.
Validation
Current status
Final SHA 4fbcb63. Draft until the target repository CI and Security Scan pass on this exact SHA. No merge, release or deployment.