Skip to content

resource_metering: Aggregate RawRecords before picking topN records (#18834)#18876

Merged
ti-chi-bot[bot] merged 3 commits intotikv:release-8.5from
ti-chi-bot:cherry-pick-18834-to-release-8.5
Nov 11, 2025
Merged

resource_metering: Aggregate RawRecords before picking topN records (#18834)#18876
ti-chi-bot[bot] merged 3 commits intotikv:release-8.5from
ti-chi-bot:cherry-pick-18834-to-release-8.5

Conversation

@ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #18834

What is changed and how it works?

Issue Number: Close #18844

What's Changed:

Add an aggregator to aggregate RawRecords by the extra tag before picking topN records.

Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:
  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
    Test the TPCH10 benchmark, and check the other time drops from 38% to 0.0033%.
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Release note

It improves the accuracy of data collected for topsql.

close tikv#18844

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/cherry-pick-not-approved labels Aug 25, 2025
@ti-chi-bot ti-chi-bot added contribution This PR is from a community contributor. dco-signoff: yes Indicates the PR's author has signed the dco. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. ok-to-test Indicates a PR is ready to be tested. labels Aug 25, 2025
@ti-chi-bot ti-chi-bot bot added the dco-signoff: yes Indicates the PR's author has signed the dco. label Aug 25, 2025
@ti-chi-bot ti-chi-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. type/cherry-pick-for-release-8.5 This PR is cherry-picked to release-8.5 from a source PR. labels Aug 25, 2025
Signed-off-by: yibin87 <huyibin@pingcap.com>
Signed-off-by: yibin87 <huyibin@pingcap.com>
@yibin87
Copy link
Contributor

yibin87 commented Aug 25, 2025

/cc @nolouch @glorv

@ti-chi-bot ti-chi-bot bot requested review from glorv and nolouch August 25, 2025 08:22
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Aug 26, 2025
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 26, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Aug 26, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-08-26 01:56:06.028785998 +0000 UTC m=+232457.906616953: ☑️ agreed by glorv.
  • 2025-08-26 01:59:25.358847424 +0000 UTC m=+232657.236678378: ☑️ agreed by nolouch.

Copy link
Member

@zhangjinpeng87 zhangjinpeng87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Nov 7, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: glorv, nolouch, zhangjinpeng87

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [glorv,zhangjinpeng87]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@yibin87
Copy link
Contributor

yibin87 commented Nov 10, 2025

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 10, 2025
@yibin87
Copy link
Contributor

yibin87 commented Nov 10, 2025

/test pull-check-deps

@ti-chi-bot ti-chi-bot bot added cherry-pick-approved Cherry pick PR approved by release team. and removed do-not-merge/cherry-pick-not-approved labels Nov 11, 2025
@ti-chi-bot ti-chi-bot bot merged commit 75f416e into tikv:release-8.5 Nov 11, 2025
5 checks passed
@ti-chi-bot ti-chi-bot bot deleted the cherry-pick-18834-to-release-8.5 branch November 11, 2025 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved cherry-pick-approved Cherry pick PR approved by release team. contribution This PR is from a community contributor. dco-signoff: yes Indicates the PR's author has signed the dco. lgtm ok-to-test Indicates a PR is ready to be tested. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. type/cherry-pick-for-release-8.5 This PR is cherry-picked to release-8.5 from a source PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants