syncstorage-rs icon indicating copy to clipboard operation
syncstorage-rs copied to clipboard

Force all users to a given node ID

Open data-sync-user opened this issue 1 year ago • 2 comments

We have some users still reporting that they’re on AWS nodes. We should force all users to go to the Spanner node.

┆Issue is synchronized with this Jira Task

data-sync-user avatar Feb 27 '24 22:02 data-sync-user

This is already being done by setting SYNC_TOKENSERVER__SPANNER_NODE_ID.

jrconlin avatar Feb 28 '24 00:02 jrconlin

I am hot sure, but I believe there may be an edge case where a user record may not be properly migrated. tokenserver::handlers::update_user(..) only migrates the user via db.post_user(..) if the req.auth_data.client_state (from the auth token) does not match the req.user.client_state (from the stored user record). (The later generation check does not alter the node_id.)

I have no idea how the user could end up in this state, and it presumes that the auth token has not changed, but we should check the user's previous node_id to see if it matches the spanner_node_id and force an update if it does not.

jrconlin avatar Feb 28 '24 17:02 jrconlin

➤ Philip Jenvey commented:

Superseded by https://mozilla-hub.atlassian.net/browse/SYNC-4181 ( https://mozilla-hub.atlassian.net/browse/SYNC-4181|smart-link )

data-sync-user avatar May 14 '24 22:05 data-sync-user