Repository navigation
feat: write account last-seen timestamp in a BigQuery table - #2663
Merged
Merged
Conversation
Collaborator
Author
|
Sorry about the sizeable patch. A lot of it is to capture the data when we can't get it into BigQuery. That should be rare; we will have Sentry events if and when that happens. |
chenba
force-pushed
the
sync-last-seen-stor-686
branch
from
October 14, 2026 18:13
5f44337 to
f496921
Compare
Because:
- we want to know when an account was most recently "active" so we can
help FxA delete inactive accounts
This commit:
- buffers records of fxa uid, oauth client id, timestamp after
successful token exchange
- flushes record batches based on elapsed time or buffer size
- writes records to the log if they were not successfully written to BQ
- uses a separate logger so we won't overwhelm the queue of the main
logger
- adds a feature flag for the feature
chenba
force-pushed
the
sync-last-seen-stor-686
branch
from
October 14, 2026 18:56
f496921 to
6abd8dd
Compare
pjenvey
reviewed
Oct 15, 2026
| .lock() | ||
| .unwrap_or_else(PoisonError::into_inner) | ||
| .clone() | ||
| .unwrap_or_else(slog_scope::logger) |
Member
There was a problem hiding this comment.
Might be worth returning an explicit error in this case?
| /// Actix's 30-second request drain plus one 10-second upload attempt. | ||
| pub const SHUTDOWN_BUDGET: Duration = Duration::from_secs(40); | ||
| /// How often the coordinator checks for rows recorded after a shutdown signal. | ||
| const SHUTDOWN_POLL: Duration = Duration::from_millis(100); |
Member
There was a problem hiding this comment.
I think we can avoid this poll by tracking the draining (see this branch)
Co-authored-by: Philip Jenvey <pjenvey@underboss.org>
chenba
force-pushed
the
sync-last-seen-stor-686
branch
from
October 16, 2026 16:49
f88e810 to
d828074
Compare
pjenvey
approved these changes
Oct 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Because:
This commit:
Closes STOR-686