mozilla-services / syncstorage-rs

Sync Storage server in Rust
Mozilla Public License 2.0
894 stars 49 forks source link

Force all users to a given node ID #1523

Closed data-sync-user closed 4 months ago

data-sync-user commented 6 months ago

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

jrconlin commented 6 months ago

This is already being done by setting SYNC_TOKENSERVER__SPANNER_NODE_ID.

jrconlin commented 6 months ago

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.

data-sync-user commented 4 months ago

➤ Philip Jenvey commented:

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