-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue that would cause the poller not to panic correctly (#1030)
- Loading branch information
1 parent
1aa21c6
commit f2deb3e
Showing
1 changed file
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
f2deb3e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It I understand the code right, there are still two potential race conditions in that code path:
Meeting.all.select
line, and themeeting.save!
line that finally marks the server as offline and prevents new meetings. Those new meetings will not be destroyed.meetings.each
loop still runs. Themeeting.destroy!
line will then raise aRecordNotDestroyed
error which is re-raised and ends the loop early. All remaining meetings will not be destroyed.Both are actually not that unlikely, because the loop tries to send lots of end-meeting API calls to a BBB server that we already know is unresponsive.
To avoid those race condition, the server should be marked as offline first, then all meetings should be stopped and destroyed. Any errors should be suppressed, not re-raised.