-
Notifications
You must be signed in to change notification settings - Fork 16
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: add secondary_write for channels #597
Conversation
There are a few extra debug and trace bits in there to help me identify a problem with my local testing. |
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.
couple things:
- save_message and save_messages are missing the metrics on ignoring the secondary error
- another thing we should fix while we're in here:
get_channels
has an inaccurate comment about having to copy over channels, this is probably from before we added theadd_channels
copying inget_user
. Also I would argue that it's unique in that it doesn't need to check secondary at all, ever? So it would probably make sense to remove that block entirely? (It certainly shouldn't need to check secondary whenchannels.is_empty()
I would more strongly argue)
though I suppose we could always have an edge case where node A migrates the user record, then node B reads it and the channels from bigtable before node A migrates the channels.. (even though bigtable keeps it all in the same row we write it separately) |
… bug/SYNC-4121_secondary
…/autopush-rs into bug/SYNC-4121_secondary
Both of those return |
That comment and the code pre-date your change to the channels, so it's fair to just drop it. I think the edge case is fairly minor and at worst would result in the client rebuilding it's list (if it's mobile, at least). We might also hit an equally edge case of an endpoint fetching the User Record and not finding a channel, then returning a 404 response, but that may also be temporary since we know providers don't generally pay attention to return codes. |
ah, my mistake 👍 |
write_to_secondary
to trueCloses SYNC-4121