-
Notifications
You must be signed in to change notification settings - Fork 4.1k
spanconfig: cleanup system span configs that apply to a tenant when GC-ing it #76931
Copy link
Copy link
Closed
Closed
Copy link
Labels
C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-kvKV TeamKV Teambranch-masterFailures and bugs on the master branch.Failures and bugs on the master branch.release-blockerIndicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked.Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked.
Description
Describe the problem
Currently, when we GC a tenant, we remove all span configurations that the tenant has installed in KV here:
Lines 472 to 483 in e81c2e7
| records, err := scKVAccessor.GetSpanConfigRecords( | |
| ctx, []spanconfig.Target{spanconfig.MakeTargetFromSpan(tenantSpan)}, | |
| ) | |
| if err != nil { | |
| return err | |
| } | |
| toDelete := make([]spanconfig.Target, len(records)) | |
| for i, record := range records { | |
| toDelete[i] = record.Target | |
| } | |
| return scKVAccessor.UpdateSpanConfigRecords(ctx, toDelete, nil /* toUpsert */) |
This doesn't account for system span configurations that the tenant has installed on its entire keyspace or the host tenant has installed on the tenant's keyspace. We should be cleaning these up as well when we GC the tenant.
Jira issue: CRDB-13331
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-kvKV TeamKV Teambranch-masterFailures and bugs on the master branch.Failures and bugs on the master branch.release-blockerIndicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked.Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked.