-
Notifications
You must be signed in to change notification settings - Fork 21
bug: Check to see if the user still exists before registering channels #713
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
base: master
Are you sure you want to change the base?
Conversation
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
* also added function descriptor comment
|
Thinking about this. We might want to use something like a conditional write instead? |
|
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 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. |
|
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. |
| Ok(predicate_matched) | ||
| } | ||
|
|
||
| async fn check_user(&self, uaid: &Uuid) -> DbResult<bool> { |
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.
if this feature is ever needed: I think it would be better to move the check into add_channels itself. Its write would become a check_and_mutate depending on the existence of the row key (the same check used by add_user w/ a true instead of false filter)
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