Skip to content

Commit

Permalink
backup: set admission header on backup requests
Browse files Browse the repository at this point in the history
Reelase note: none.
  • Loading branch information
dt committed Mar 30, 2022
1 parent 4bce84e commit dffb0fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pkg/ccl/backupccl/backup_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,12 +409,8 @@ 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,
NoMemoryReservedAtSource: true,
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 = -49
// NormalPri is normal priority work.
NormalPri WorkPriority = 0
// UserHighPri is high priority work from user submissions (SQL).
Expand Down

0 comments on commit dffb0fa

Please sign in to comment.