Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

Reserve and limit overhaul #123

Merged
merged 3 commits into from
Aug 5, 2020
Merged

Reserve and limit overhaul #123

merged 3 commits into from
Aug 5, 2020

Conversation

feymartynov
Copy link
Contributor

No description provided.

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)
Copy link
Member

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?

Copy link
Member

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.

Copy link
Contributor Author

@feymartynov feymartynov Aug 4, 2020

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.

Copy link
Contributor Author

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.

docs/src/api/room/create.md Outdated Show resolved Hide resolved
@feymartynov feymartynov merged commit 11808eb into master Aug 5, 2020
@feymartynov feymartynov deleted the feature/ULMS-687 branch August 5, 2020 12:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants