Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Backfill realm stats based on user and apikey stats #527

Merged
merged 1 commit into from
Sep 11, 2020

Conversation

sethvargo
Copy link
Member

This uses the existing stats we've been collecting to backfill them onto the realm stats. It only includes backfill up to 9/15, which is when we'll cut a new release.

Release Note

Add backfill migration for realm stats

@googlebot googlebot added the cla: yes Auto: added by CLA bot when all committers have signed a CLA. label Sep 11, 2020
@google-oss-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mikehelmick, sethvargo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [mikehelmick,sethvargo]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-robot google-oss-robot merged commit c80be22 into main Sep 11, 2020
@google-oss-robot google-oss-robot deleted the sethvargo/backfill_realm_stats branch September 11, 2020 16:14
ID: "00040-BackfillRealmStats",
Migrate: func(tx *gorm.DB) error {
logger.Debugw("db migrations: back-filling realm stats")
sqls := []string{
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it is worth the over haul now but would it be safer and more performant to use batch calls?

*I just started learning about this so I don't have a good understanding of the true advantages of removing round trip to database between calls.

@google google locked and limited conversation to collaborators Oct 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes Auto: added by CLA bot when all committers have signed a CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants