-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CHA-RL3c][RoomLifecycle] Redundant _releaseInProgress
check
#399
Comments
Maybe |
Perhaps the spec could be a bit clearer - but I don't think they necessarily conflict here. The spec mentions that the operation will not "commence" until the previous has finished, however - it's quite possible that you could argue that checking whether an operation is already in progress and piggybacking off it could occur outside of this (I'd need to think this through, however). In fact for some future changes, we might want to make it so that simple checks on room status etc (i.e. the releasing check) could occur outside of the mutually exclusive zone. The only thing that really needs to be mutually exclusive is the part when we start doing channel ops.
|
Yeah, I mean we don't need |
Also, it seems |
That is true, though I can imagine a world whereby depending on exact implementation, we might want to check the status before we request the mtx and short circuit if we can, and again once we have it (at least in JS where we have single thread execution). |
I strongly feel that, exposing a new world without mtx, would compromise the integrity of the current roomLifeCycelManager where we proudly say each operation is Currently, every operation is executed under Also, having Also, I don't feel there is any performance overhead as such, |
Also, I think we should avoid opening this new world, to ensure the atomicity of each operation and for the sake of other SDKs where we need to deal with concurrency issues due to multithreaded env 😬 |
I agree that at the moment I don't think there's a strong reason to change what we have - I was just giving an example of how things could potentially change in the future if there was a use-case (is being able to check certain state values prematurely necessarily a bad thing, so long as you re-check them within the mutex, for example). Re |
Thanks, this is helpful 👍 |
As per #397 (comment), I believe we might like to remove the following checks as a part of
|
@AndyTWF I have raised PR to remove related spec point ably/specification#230. Maybe as per our discussion, having |
We can get rid of a lot of redundant code since it is not needed. |
_releaseInProgress
check
Related spec ably/specification#230 has been merged hence related code can be refactored/ completely removed : ) |
ably-chat-js/src/core/room-lifecycle-manager.ts
Lines 799 to 818 in 0e1b523
release
op, since new release operation will only start after the previousrelease
operation has finished._releaseInProgress
flag, wdyt┆Issue is synchronized with this Jira Task by Unito
The text was updated successfully, but these errors were encountered: