[Upstream] feat: add AddUsedQuota function and optimize quota logic#108
Open
[Upstream] feat: add AddUsedQuota function and optimize quota logic#108
Conversation
1. Add new function AddUsedQuota to increase used_quota without changing remain_quota 2. Modify PostConsumeTokenQuota to handle unlimited quota tokens properly 3. Fix error handling flow in PostConsumeTokenQuota to ensure proper quota updates 4. Add accessed_time update when quota is consumed Log: Optimized token quota management and added used quota tracking Influence: 1. Test AddUsedQuota function with various quota values 2. Verify PostConsumeTokenQuota behavior with unlimited quota tokens 3. Test quota consumption flow for both limited and unlimited tokens 4. Verify accessed_time is properly updated during quota operations 5. Test error handling in quota operations 6. Verify backward compatibility with existing quota logic feat: 添加 AddUsedQuota 函数并优化配额逻辑 1. 添加新的 AddUsedQuota 函数,仅增加已用配额而不改变剩余配额 2. 修改 PostConsumeTokenQuota 函数以正确处理无限配额令牌 3. 修复 PostConsumeTokenQuota 中的错误处理流程,确保配额更新正确执行 4. 在配额消耗时更新访问时间 Log: 优化令牌配额管理并添加已用配额跟踪功能 Influence: 1. 测试 AddUsedQuota 函数在各种配额值下的表现 2. 验证无限配额令牌在 PostConsumeTokenQuota 中的行为 3. 测试有限和无限令牌的配额消耗流程 4. 验证配额操作期间访问时间是否正确更新 5. 测试配额操作中的错误处理机制 6. 验证与现有配额逻辑的向后兼容性
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.
Synced from upstream PR: songquanpeng#2320
Log: Optimized token quota management and added used quota tracking
Influence:
feat: 添加 AddUsedQuota 函数并优化配额逻辑
Log: 优化令牌配额管理并添加已用配额跟踪功能
Influence:
close songquanpeng#506