Skip to content

Commit

Permalink
Merge #90448 #91146
Browse files Browse the repository at this point in the history
90448: admission: Disable admission control for user requests r=andrewbaptist a=andrewbaptist

informs: #85641

Only leave admission control in place for elastic / bulk requests.

Release note: None

91146: storage: enable MVCC range tombstones by default r=erikgrinaker a=erikgrinaker

Resolves #88708.

Release note: None

Co-authored-by: Andrew Baptist <[email protected]>
Co-authored-by: Erik Grinaker <[email protected]>
  • Loading branch information
3 people committed Nov 3, 2022
3 parents 42c6d47 + c8c8535 + 3d34800 commit 0965142
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
7 changes: 7 additions & 0 deletions pkg/kv/kvserver/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -4024,6 +4024,13 @@ 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 admissionpb.WorkPriority(ba.AdmissionHeader.Priority) >= admissionpb.NormalPri {
bypassAdmission = true
}
}

createTime := ba.AdmissionHeader.CreateTime
if !bypassAdmission && createTime == 0 {
// TODO(sumeer): revisit this for multi-tenant. Specifically, the SQL use
Expand Down
5 changes: 2 additions & 3 deletions pkg/storage/mvcc.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,8 @@ var minWALSyncInterval = settings.RegisterDurationSetting(
var MVCCRangeTombstonesEnabled = settings.RegisterBoolSetting(
settings.SystemOnly,
"storage.mvcc.range_tombstones.enabled",
"experimental: if true, enable the use of MVCC range tombstones. Do not enable "+
"unless you're aware of the corruption risk.",
false)
"enables the use of MVCC range tombstones",
true)

// CanUseMVCCRangeTombstones returns true if the caller can begin writing
// MVCC range tombstones, by setting DeleteRangeRequest.UseRangeTombstone.
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 @@ -51,6 +51,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

0 comments on commit 0965142

Please sign in to comment.