Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mpp maybe take up a lot of memory when SendRequest #40926

Closed
wshwsh12 opened this issue Feb 1, 2023 · 1 comment
Closed

Mpp maybe take up a lot of memory when SendRequest #40926

wshwsh12 opened this issue Feb 1, 2023 · 1 comment
Labels
affects-6.1 This bug affects the 6.1.x(LTS) versions. affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-6.6 affects-7.0 affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. severity/major sig/execution SIG execution type/bug The issue is confirmed as a bug.

Comments

@wshwsh12
Copy link
Contributor

wshwsh12 commented Feb 1, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. Insert some data.
drop table `sli-gauge-metric`;
CREATE TABLE `sli-gauge-metric` (
  `timestamp` bigint(20) NOT NULL,
  `instance` varchar(128) NOT NULL,
  `cluster_id` varchar(128) NOT NULL,
  `metrics` json DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

insert 65536 rows, contains 10000 bytes json text in each row.

  1. Set tiflase replica and wait sync.
  2. Run sql desc analyze select * from `sli-gauge-metric` order by cluster_id;
  3. Use go profile to generate heap graph.

2. What did you expect to see? (Required)

Profile heap only contains the memory of MPP or Sort Executor.

3. What did you see instead (Required)

There are many memory usage in client-go GetRegionError() when recving the FIRST MPPPacket
image

Related code:
https://github.com/tikv/client-go/blob/35416c4c4373bb0ee85e0feef38af777d7b63f4b/tikvrpc/tikvrpc.go#L960

4. What is your TiDB version? (Required)

master

@wshwsh12 wshwsh12 added the type/bug The issue is confirmed as a bug. label Feb 1, 2023
@ti-chi-bot ti-chi-bot added may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.0 may-affects-6.1 may-affects-6.2 may-affects-6.3 may-affects-6.4 may-affects-6.5 labels Feb 6, 2023
@seiya-annie seiya-annie added sig/execution SIG execution and removed may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-6.0 may-affects-6.1 may-affects-6.2 may-affects-6.3 may-affects-6.4 may-affects-6.5 labels Feb 6, 2023
@VelocityLight VelocityLight added the affects-7.1 This bug affects the 7.1.x(LTS) versions. label Apr 20, 2023
@ti-chi-bot ti-chi-bot added the affects-7.5 This bug affects the 7.5.x(LTS) versions. label Oct 23, 2023
@ti-chi-bot ti-chi-bot added the affects-8.1 This bug affects the 8.1.x(LTS) versions. label Apr 9, 2024
@windtalker
Copy link
Contributor

already fixed by tikv/client-go#1108 in v8.1

windtalker added a commit to windtalker/tidb that referenced this issue May 10, 2024
windtalker added a commit to windtalker/tidb that referenced this issue May 10, 2024
windtalker added a commit to windtalker/tidb that referenced this issue May 10, 2024
windtalker added a commit to windtalker/tidb that referenced this issue May 10, 2024
@windtalker windtalker removed the affects-8.1 This bug affects the 8.1.x(LTS) versions. label May 10, 2024
@ti-chi-bot ti-chi-bot added affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-6.1 This bug affects the 6.1.x(LTS) versions. labels May 10, 2024
ti-chi-bot bot pushed a commit that referenced this issue May 10, 2024
ti-chi-bot bot pushed a commit that referenced this issue May 10, 2024
ti-chi-bot bot pushed a commit that referenced this issue May 10, 2024
ti-chi-bot bot pushed a commit that referenced this issue May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.1 This bug affects the 6.1.x(LTS) versions. affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-6.6 affects-7.0 affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. severity/major sig/execution SIG execution type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

5 participants