bug: Check to see if the user still exists before registering channels#713
bug: Check to see if the user still exists before registering channels#713
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.
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