Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release-22.1: backupccl: mark backup ExportRequests as Bulk priority #79333

Merged
merged 1 commit into from
Apr 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions pkg/ccl/backupccl/backup_processor.go
Original file line number Diff line number Diff line change
@@ -409,14 +409,10 @@ func runBackupProcessor(
admissionHeader := roachpb.AdmissionHeader{
// Export requests are currently assigned NormalPri.
//
// TODO(bulkio): the priority should vary based on the urgency of
// these background requests. These exports should get LowPri,
// unless they are being retried and need to be completed in a
// timely manner for compliance with RPO and data retention
// policies. Consider deriving this from the UserPriority field.
Priority: int32(admission.NormalPri),
// TODO(dt): Consider linking this to/from the UserPriority field.
Priority: int32(admission.BulkNormalPri),
CreateTime: timeutil.Now().UnixNano(),
Source: roachpb.AdmissionHeader_ROOT_KV,
Source: roachpb.AdmissionHeader_FROM_SQL,
NoMemoryReservedAtSource: true,
}
log.Infof(ctx, "sending ExportRequest for span %s (attempt %d, priority %s)",
3 changes: 3 additions & 0 deletions pkg/util/admission/work_queue.go
Original file line number Diff line number Diff line change
@@ -152,6 +152,9 @@ const (
TTLLowPri WorkPriority = -100
// UserLowPri is low priority work from user submissions (SQL).
UserLowPri WorkPriority = -50
// BulkNormalPri is bulk priority work from bulk jobs, which could be run due
// to user submissions or be automatic.
BulkNormalPri WorkPriority = -30
// NormalPri is normal priority work.
NormalPri WorkPriority = 0
// UserHighPri is high priority work from user submissions (SQL).