Skip to content

Commit

Permalink
review: fix typos and whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
majewsky committed Dec 9, 2024
1 parent 717a028 commit 8e72ed5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/datamodel/apply_computed_project_quota.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ var (
WHERE ps.type = $1 AND pr.name = $2 AND (pr.min_quota_from_backend IS NOT NULL
OR pr.max_quota_from_backend IS NOT NULL
OR pr.max_quota_from_outside_admin IS NOT NULL
OR pr.max_quota_from_local_admin IS NOT NULL
OR pr.max_quota_from_local_admin IS NOT NULL
OR pr.override_quota_from_config IS NOT NULL)
`)

Expand Down Expand Up @@ -173,7 +173,7 @@ func ApplyComputedProjectQuota(serviceType db.ServiceType, resourceName liquid.R
if err != nil {
return fmt.Errorf("in AZ %s in project resource %d: %w", az, resourceID, err)
}
// AZSeparated Toplogy does not update resource quota. Therefore the service desync will be prepared right here.
// AZSeparatedResourceTopology does not update resource quota. Therefore the service desync needs to be queued right here.
if resInfo.Topology == liquid.AZSeparatedResourceTopology {
var serviceID db.ProjectServiceID
err := tx.SelectOne(&serviceID, `SELECT service_id FROM project_resources WHERE id = $1`, resourceID)
Expand All @@ -199,7 +199,7 @@ func ApplyComputedProjectQuota(serviceType db.ServiceType, resourceName liquid.R
}

err = sqlext.WithPreparedStatement(tx, acpqUpdateProjectQuotaQuery, func(stmt *sql.Stmt) error {
// Skip resources with AZSeparated toplogy. The quota scrape would receive a resource nil value, while ACPQ calculates qouta.
// Skip resources with AZSeparatedResourceTopology. The quota scrape would receive a resource nil value, while ACPQ calculates qouta.
// This would lead to unnecessary quota syncs with the backend, because backendQuota != quota.
if resInfo.Topology == liquid.AZSeparatedResourceTopology {
return nil
Expand Down

0 comments on commit 8e72ed5

Please sign in to comment.