-
Notifications
You must be signed in to change notification settings - Fork 7
Conversation
src/db/janus_backend.rs
Outdated
LEFT JOIN room AS r2 | ||
ON 1 = 1 | ||
WHERE r2.id = $1 | ||
AND COALESCE(jb.subscribers_limit, 2147483647) - COALESCE(sub.taken, 0) > COALESCE(r2.reserve, 0) |
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.
Shouldn't we change subscribers_limit
field to reserve
?
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 seems as we just subtract the largest room capacity from the capacity of its janus host, when we must subtract the sum of capacities over all rooms that share the same janus host.
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.
Shouldn't we change subscribers_limit field to reserve?
For janus_backend
no because it's actually a limit.
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 seems as we just subtract the largest room capacity from the capacity of its janus host, when we must subtract the sum of capacities over all rooms that share the same janus host.
Good point. Fixed.
9e8d61f
to
13912ff
Compare
13912ff
to
3b1edf0
Compare
No description provided.