Skip to content

Commit

Permalink
util: publish cidr metrics for tenants
Browse files Browse the repository at this point in the history
Previously the cidr metrics were only started for the system tenant.
This was problematic for SQL tenants since the mapping wouldn't be
updated.

Fixes: #130708

Release note: None
  • Loading branch information
andrewbaptist committed Sep 13, 2024
1 parent 7af0732 commit 95cb339
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/server/tenant.go
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,13 @@ func newTenantServer(
}
}

// NB: On a shared process tenant, we start cidr once per tenant.
// Potentially we could share this across tenants, but this breaks the
// tenant separation model. For a small number of tenants this is OK, but if
// we have a large number of tenants in shared process mode this could be a
// problem from a memory and network perspective.
baseCfg.CidrLookup.Start(ctx, stopper)

// Instantiate the SQL server proper.
sqlServer, err := newSQLServer(ctx, args)
if err != nil {
Expand Down

0 comments on commit 95cb339

Please sign in to comment.