Skip to content

kvfeed: fix scanRequestScanner.exportScan integration with admission control #88733

@sumeerbhola

Description

@sumeerbhola

scanRequestScanner.exportScan does txn := p.db.NewTxn(ctx, "changefeed backfill") which creates a txn with (roachpb.AdmissionHeader_OTHER, admissionpb.NormalPri). OTHER bypasses admission control. It should use a variant of NewTxnRootKV to create a txn with (roachpb.AdmissionHeader_ROOT_KV, admissionpb.BulkNormalPrii).

This will likely not fix the performance isolation problems with backfills, as discussed in (a) https://cockroachlabs.slack.com/archives/C9TGBJB44/p1663864200211769?thread_ts=1663855656.539239&cid=C9TGBJB44, (b) the 16MB value of changefeed.backfill.scan_request_size is likely to be too large and fixing will require integrating low priority ScanRequests with the elastic cpu behavior. But it may help a bit, and this change is tiny enough to backport.

@cockroachdb/admission-control

Jira issue: CRDB-19940

Metadata

Metadata

Assignees

Labels

A-admission-controlC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions