pingcap / pingcap/tidb

RUv2 DML row-column metrics count attempted rows

Open
#69,135 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Issue

RUv2 DML row-column accounting currently can count attempted/evaluated rows instead of actual written rows.

For `UPDATE`, rows can be accumulated before TiDB knows whether the row is actually written, so no-op updates or rows skipped by `UPDATE IGNORE` may still add non-zero L5 row-column cost.

For `INSERT IGNORE`, `InsertValues.rowCount` can include ignored duplicate rows, so the L5 row-column cost may include rows that were not inserted.

Expected behavior: DML row-column cost should be based on rows that are actually written.

Originally pointed out in https://github.com/pingcap/tidb/pull/68578#pullrequestreview-4471509838

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.