-
Notifications
You must be signed in to change notification settings - Fork 4.1k
kvfeed: fix scanRequestScanner.exportScan integration with admission control #88733
Description
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