fix(data-consumption): prevent hook usage counter from going negative - #25403
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
WalkthroughHook usage count updates now use Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Checkov (3.3.8)bigbluebutton-html5/package.jsonTraceback (most recent call last): Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
GuiLeme
left a comment
There was a problem hiding this comment.
Just this comment that would imply changes here: bigbluebutton/bigbluebutton-html-plugin-sdk#278 (review)
The usage counter that tracks how many plugins are listening to a given subscription can reach negative values, which is invalid and likely indicates a bug in the unsubscribe logic. Extract the hook usage update logic into a dedicated function that guards against negative values and logs a warning when such an update is attempted.
d7a04ce to
c1506bc
Compare
✅ Automated tests have passed! |
GuiLeme
left a comment
There was a problem hiding this comment.
LGTM
Tested locally and reviewed the code.



What does this PR do?
The usage counter that tracks how many plugins are listening to a given subscription can reach negative values, which is invalid and likely indicates a bug in the unsubscribe logic.
Extract the hook usage update logic into a dedicated function that guards against negative values and logs a warning when such an update is attempted.
Closes Issue(s)
Closes N/A
More
Closely related to:
useCustomSubscriptionstuck inloading: truestate bigbluebutton-html-plugin-sdk#275