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: admission: temporary knob to disable AC for user requests #91928

Merged
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions pkg/kv/kvserver/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -3728,6 +3728,12 @@ func (n KVAdmissionControllerImpl) AdmitKVWork(
if source == roachpb.AdmissionHeader_OTHER {
bypassAdmission = true
}
// TODO(abaptist): Revisit and deprecate this setting in v23.1.
if admission.KVBulkOnlyAdmissionControlEnabled.Get(&n.settings.SV) {
if admission.WorkPriority(ba.AdmissionHeader.Priority) >= admission.NormalPri {
bypassAdmission = true
}
}
createTime := ba.AdmissionHeader.CreateTime
if !bypassAdmission && createTime == 0 {
// TODO(sumeer): revisit this for multi-tenant. Specifically, the SQL use
Expand Down
14 changes: 14 additions & 0 deletions pkg/util/admission/work_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,20 @@ var KVAdmissionControlEnabled = settings.RegisterBoolSetting(
"when true, work performed by the KV layer is subject to admission control",
true).WithPublic()

// KVBulkOnlyAdmissionControlEnabled controls whether user (normal and above
// priority) work is subject to admission control. If it is set to true, then
// user work will not be throttled by admission control but bulk work still will
// be. This setting is a preferable alternative to completely disabling
// admission control. It can be used reactively in cases where index backfill,
// schema modifications or other bulk operations are causing high latency due to
// io_overload on nodes.
// TODO(baptist): Find a better solution to this in v23.1.
var KVBulkOnlyAdmissionControlEnabled = settings.RegisterBoolSetting(
settings.SystemOnly,
"admission.kv.bulk_only.enabled",
"when both admission.kv.enabled and this is true, only throttle bulk work",
false)

// SQLKVResponseAdmissionControlEnabled controls whether response processing
// in SQL, for KV requests, is enabled.
var SQLKVResponseAdmissionControlEnabled = settings.RegisterBoolSetting(
Expand Down