THM-Health / PILOS

PILOS is an easy-to-use open source front-end for BigBlueButton servers with a built-in load balancer. Docker-Images: https://hub.docker.com/r/pilos/pilos
https://thm-health.github.io/PILOS/
GNU Lesser General Public License v2.1
51 stars 19 forks source link

Meeting Marked as Ended Prematurely Due to Timing Conflict Between BBB API and Server Poller #1607

Closed SamuelWei closed 4 days ago

SamuelWei commented 4 days ago

Describe the bug
A room is started and is nearly immediately marked as ended in the database. This prevents other users from entering the meeting and may lead to a new meeting being created by users with the permission to do so.

The issue occurs when the create meeting request to the BigBlueButton (BBB) API is still being processed, and the server poller queries the meeting on the BBB server before the creation process is complete. Since the meeting is already added to the database but doesn't yet exist on the server, the server poller considers the meeting "ended" and updates the database accordingly.

To Reproduce
Steps to reproduce the behavior:

  1. Start a room that uses the BBB API for meeting creation.
  2. Ensure the server poller queries the BBB server while the meeting is still being created.
  3. Check the database and note that the meeting is marked as ended prematurely.
  4. Try to join the meeting as another user and observe the inability to enter due to the meeting being marked as ended.

Expected behavior
The meeting should remain in the "creating" state until the BBB API confirms its successful creation. The server poller should not mark the meeting as ended if the creation process is still in progress.

Additional context
This issue highlights a timing problem between the BBB API meeting creation process and the server poller's query interval. Adjustments to the server poller's behavior or introducing a "pending creation" state for meetings might be potential solutions to prevent this conflict.