Skip to content
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

Don’t replace existing discontinuity event #246

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lawrence-forooghian
Copy link
Collaborator

Make CHA-RL4b1 consistent with CHA-RL4a3.

Make CHA-RL4b1 consistent with CHA-RL4a3.
Copy link
Collaborator

@sacOO7 sacOO7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following our discussion here, we agree that only one discontinuity event will be stored per contributor. The remaining question is whether we should override it with the latest error.

I suggest we either override the discontinuity event with the latest error or store the discontinuity event with a list of unique errors. This approach would prevent overwhelming users with excessive notifications while providing relevant information about the discontinuity. This will also help users to identify discontinuity if caused by message rate limitations as per second point mentioned here or any other app limitations.

@AndyTWF
Copy link
Contributor

AndyTWF commented Dec 4, 2024

Following our discussion here, we agree that only one discontinuity event will be stored per contributor. The remaining question is whether we should override it with the latest error.

I suggest we either override the discontinuity event with the latest error or store the discontinuity event with a list of unique errors. This approach would prevent overwhelming users with excessive notifications while providing relevant information about the discontinuity. This will also help users to identify discontinuity if caused by message rate limitations as per second point mentioned here or any other app limitations.

The original proposal is that we store and emit the original error, and only the original. From a user perspective - telling them about multiple discontinuities isn't particularly helpful in the case that the original event wasn't emitted immediately due to a lifecycle operation in progress. If anything, it could be more confusing - do we expect them to handle all the errors in some way, some of the discontinuities won't be important / something they should worry about, and are simply because of the room lifecycle atomicity.

I think we should merge this PR as-is, as it represents the current state-of-play (so-as not to block impeding releases), then we can discuss changes / improvements to the room lifecycle more broadly on the road to GA.

Copy link
Collaborator

@sacOO7 sacOO7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added comments to rephrase spec points

@@ -191,7 +191,8 @@ As well as user-initiated operations, the room must monitor its underlying resou
*** @(CHA-RL4a3)@ @[Testable]@ If a room lifecycle operation is in progress, then a pending discontinuity event shall be recorded for this contributor - though it must not overwrite any existing discontinuity event. The @ErrorInfo@ associated with the discontinuity shall be the @reason@ for the underlying channel state change. The event will be notified to the contributor at a later point, as noted in this specification.
Copy link
Collaborator

@sacOO7 sacOO7 Dec 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
*** @(CHA-RL4a3)@ @[Testable]@ If a room lifecycle operation is in progress, then a pending discontinuity event shall be recorded for this contributor - though it must not overwrite any existing discontinuity event. The @ErrorInfo@ associated with the discontinuity shall be the @reason@ for the underlying channel state change. The event will be notified to the contributor at a later point, as noted in this specification.
*** @(CHA-RL4a3)@ @[Testable]@ If a room lifecycle operation is in progress, then a pending discontinuity event shall be recorded for this contributor - though it must not overwrite any existing discontinuity event. The @ErrorInfo@ associated with the discontinuity shall be set to the @reason@ from the underlying channel state change. The event will be notified to the contributor at a later point, as noted in this specification.

@@ -191,7 +191,8 @@ As well as user-initiated operations, the room must monitor its underlying resou
*** @(CHA-RL4a3)@ @[Testable]@ If a room lifecycle operation is in progress, then a pending discontinuity event shall be recorded for this contributor - though it must not overwrite any existing discontinuity event. The @ErrorInfo@ associated with the discontinuity shall be the @reason@ for the underlying channel state change. The event will be notified to the contributor at a later point, as noted in this specification.
*** @(CHA-RL4a4)@ @[Testable]@ If a room lifecycle operation is not in progress, then a discontinuity event will immediately be emitted to the contributor. The @ErrorInfo@ associated with the discontinuity shall be the @reason@ for the underlying channel state change.
** @(CHA-RL4b)@ The state monitor must handle non-@UPDATE@ channel state events.
*** @(CHA-RL4b1)@ @[Testable]@ If a room lifecycle operation is in progress, and the new channel state is @ATTACHED@, and the @resumed@ flag is false, @and@ the particular contributor has been attached previously (i.e. a previous call to @attach()@ on the channel, per @CHA-RL1f@, has succeeded), then a pending discontinuity event will be recorded for the contributor. The error associated with this event shall be the @reason@ for the channel state change.
*** @(CHA-RL4b1)@ This clause has been replaced by "@CHA-RL4b11@":#CHA-RL4b11.
*** @(CHA-RL4b11)@ @[Testable]@ If a room lifecycle operation is in progress, and the new channel state is @ATTACHED@, and the @resumed@ flag is false, @and@ the particular contributor has been attached previously (i.e. a previous call to @attach()@ on the channel, per @CHA-RL1f@, has succeeded), then a pending discontinuity event will be recorded for the contributor - though it must not overwrite any existing discontinuity event. The error associated with this event shall be the @reason@ for the channel state change.
Copy link
Collaborator

@sacOO7 sacOO7 Dec 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
*** @(CHA-RL4b11)@ @[Testable]@ If a room lifecycle operation is in progress, and the new channel state is @ATTACHED@, and the @resumed@ flag is false, @and@ the particular contributor has been attached previously (i.e. a previous call to @attach()@ on the channel, per @CHA-RL1f@, has succeeded), then a pending discontinuity event will be recorded for the contributor - though it must not overwrite any existing discontinuity event. The error associated with this event shall be the @reason@ for the channel state change.
*** @(CHA-RL4b11)@ @[Testable]@ If a room lifecycle operation is in progress, and the new channel state is @ATTACHED@, and the @resumed@ flag is false, @and@ the particular contributor has been attached previously (i.e. a previous call to @attach()@ on the channel, per @CHA-RL1f@, has succeeded), then a pending discontinuity event will be recorded for the contributor - though it must not overwrite any existing discontinuity event. The @ErrorInfo@ associated with the discontinuity shall be set to the @reason@ from the underlying channel state change.

@sacOO7
Copy link
Collaborator

sacOO7 commented Dec 4, 2024

I think we should merge this PR as-is, as it represents the current state-of-play (so-as not to block impeding releases), then we can discuss changes / improvements to the room lifecycle more broadly on the road to GA.

Okay, I don't want to block PR as such. Added few suggestions for better rephrasing the spec.
Also, had a last question, if we have an existing discontinuity with errorInfo as null, do we still not override with a new error?
Or do we set some default error when statechange.reason is null, to maintain original error : ?

@sacOO7
Copy link
Collaborator

sacOO7 commented Dec 13, 2024

Okay, I don't want to block PR as such. Added few suggestions for better rephrasing the spec. Also, had a last question, if we have an existing discontinuity with errorInfo as null, do we still not override with a new error? Or do we set some default error when statechange.reason is null, to maintain original error : ?

@AndyTWF do we set discontinuity error as null if statechange.reason is null for first discontinuity detected?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chat Related to the Chat SDK.
Development

Successfully merging this pull request may close these issues.

3 participants