-
Notifications
You must be signed in to change notification settings - Fork 21.2k
Fix missing database commit in provider update handler #24356
Copy link
Copy link
Closed
Labels
🐞 bugSomething isn't workingSomething isn't working
Description
Self Checks
- I have read the Contributing Guide and Language Policy.
- This is only for bug report, if you would like to ask a question, please head to Discussions.
- I have searched for existing issues search for existing issues, including closed ones.
- I confirm that I am using English to submit this report, otherwise it will be closed.
- 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
- Please do not modify this template :) and fill in all the required fields.
Dify version
Latest development version
Cloud or Self Hosted
Self Hosted (Source)
Steps to reproduce
- Trigger a message creation event that causes provider quota updates
- Observe that the database transaction updates are prepared but not committed
- Check the database and notice that provider quota deductions are not persisted
✔️ Expected Behavior
When provider quotas are updated after message creation, the changes should be committed to the database to ensure accurate tracking of usage and remaining quotas.
❌ Actual Behavior
The provider update handler prepares database updates but doesn't commit them to the database. The updates are lost when the session ends, causing incorrect quota tracking and potential overuse of provider limits.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
🐞 bugSomething isn't workingSomething isn't working