Skip to content

Commit

Permalink
Merge pull request #79333 from cockroachdb/blathers/backport-release-…
Browse files Browse the repository at this point in the history
…22.1-79086

release-22.1: backupccl: mark backup ExportRequests as Bulk priority
  • Loading branch information
dt authored Apr 4, 2022
2 parents 1d7daca + 296cb91 commit 415aa55
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
10 changes: 3 additions & 7 deletions pkg/ccl/backupccl/backup_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand Down
3 changes: 3 additions & 0 deletions pkg/util/admission/work_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down

0 comments on commit 415aa55

Please sign in to comment.