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

bug: Check to see if the user still exists before registering channels #713

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jrconlin
Copy link
Member

@jrconlin jrconlin commented Jun 11, 2024

there are reports of users registering a channel and the channel
immediately returning a 410. This does a simple check to see if the user
record still exists before registering. A user record may have been
removed for some reason while the user connection still persists and
this should catch for that.

Closes: SYNC-4294

there are reports of users registering a channel and the channel
immediately returning a 410. This does a simple check to see if the user
record still exists before registering. A user record may have been
removed for some reason while the user connection still persists and
this should catch for that.

Closes: SYNC-4294
@jrconlin jrconlin requested review from pjenvey and taddes June 11, 2024 17:53
@jrconlin jrconlin marked this pull request as ready for review June 11, 2024 17:53
* also added function descriptor comment
@jrconlin
Copy link
Member Author

Thinking about this.
I'm not exactly sure how a device could get into this state. We auto-prune when the bridge rejects a connection, but there may be pre-connected UAs that haven't gotten the message about that.
For now, instead of creating a potentially invalid endpoint, let's do a check to see if the user record is present before we build the endpoint. (Fortunately, with Bigtable, we're not paying per read, but this might be worth the cost in any case.)

We might want to use something like a conditional write instead?

@pjenvey
Copy link
Member

pjenvey commented Jul 11, 2024

The original issue gives the impression that its root cause is a client side issue, especially with it originally being reported on Desktop which always generates its own channel_id (passing it to the server) when registering a new subscription.

So I think we should close this (or at least set as draft) until some digging is done to rule out client side issues being the root cause.

@jrconlin jrconlin marked this pull request as draft July 12, 2024 11:32
@jrconlin
Copy link
Member Author

Yeah, I'm fine making this a draft for now. I can see this being a bit of a problem, but hopefully, it's a fairly rare edge case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants