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

buildKvRangesForIndexJoin incorrectly estimated the memory used by tmpDatumRanges #47788

Closed
SeaRise opened this issue Oct 19, 2023 · 10 comments · Fixed by #47795
Closed

buildKvRangesForIndexJoin incorrectly estimated the memory used by tmpDatumRanges #47788

SeaRise opened this issue Oct 19, 2023 · 10 comments · Fixed by #47795
Labels
affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects 5.4.x versions. affects-6.1 affects-6.5 affects-7.1 affects-7.5 severity/major sig/execution SIG execution type/bug The issue is confirmed as a bug.

Comments

@SeaRise
Copy link
Contributor

SeaRise commented Oct 19, 2023

tidb/pkg/executor/builder.go

Lines 4679 to 4681 in 6dea081

if len(tmpDatumRanges) != 0 && memTracker != nil {
memTracker.Consume(2 * int64(len(tmpDatumRanges)) * types.EstimatedMemUsage(tmpDatumRanges[0].LowVal, len(tmpDatumRanges)))
}

should be

	if len(tmpDatumRanges) != 0 && memTracker != nil {
		memTracker.Consume(2 * types.EstimatedMemUsage(tmpDatumRanges[0].LowVal, len(tmpDatumRanges)))
	}

introduce by #29068

@SeaRise
Copy link
Contributor Author

SeaRise commented Oct 20, 2023

/label affect-5.1

@ti-chi-bot
Copy link

ti-chi-bot bot commented Oct 20, 2023

@SeaRise: The label(s) affect-5.1 cannot be applied. These labels are supported: fuzz/sqlancer, challenge-program, compatibility-breaker, first-time-contributor, contribution, good first issue, correctness, duplicate, proposal, security, ok-to-test, needs-ok-to-test, needs-more-info, needs-cherry-pick-release-5.3, needs-cherry-pick-release-5.4, needs-cherry-pick-release-6.1, needs-cherry-pick-release-6.5, needs-cherry-pick-release-7.1, needs-cherry-pick-release-7.5, affects-5.3, affects-5.4, affects-6.1, affects-6.5, affects-7.1, affects-7.5, may-affects-5.3, may-affects-5.4, may-affects-6.1, may-affects-6.5, may-affects-7.1, may-affects-7.5.

In response to this:

/label affect-5.1

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@SeaRise
Copy link
Contributor Author

SeaRise commented Oct 20, 2023

label affects-5.3 affects-5.4 affects-6.1 affects-6.5 affects-7.1 affects-7.5

@SeaRise
Copy link
Contributor Author

SeaRise commented Oct 20, 2023

/label affects-5.3 affects-5.4 affects-6.1 affects-6.5 affects-7.1 affects-7.5

@SeaRise
Copy link
Contributor Author

SeaRise commented Oct 20, 2023

/label affects-5.3

@ti-chi-bot ti-chi-bot bot added affects-5.3 This bug affects 5.3.x versions. and removed may-affects-5.3 This bug maybe affects 5.3.x versions. labels Oct 20, 2023
@SeaRise
Copy link
Contributor Author

SeaRise commented Oct 20, 2023

/label affects-5.4

@ti-chi-bot ti-chi-bot bot added affects-5.4 This bug affects 5.4.x versions. and removed may-affects-5.4 This bug maybe affects 5.4.x versions. labels Oct 20, 2023
@SeaRise
Copy link
Contributor Author

SeaRise commented Oct 20, 2023

/label affects-6.1

@SeaRise
Copy link
Contributor Author

SeaRise commented Oct 20, 2023

/label affects-6.5

@SeaRise
Copy link
Contributor Author

SeaRise commented Oct 20, 2023

/label affects-7.1

@SeaRise
Copy link
Contributor Author

SeaRise commented Oct 20, 2023

/label affects-7.5

ti-chi-bot bot pushed a commit that referenced this issue Oct 23, 2023
ti-chi-bot bot pushed a commit that referenced this issue Oct 23, 2023
ti-chi-bot bot pushed a commit that referenced this issue Oct 23, 2023
ti-chi-bot bot pushed a commit that referenced this issue Oct 23, 2023
ti-chi-bot bot pushed a commit that referenced this issue Oct 23, 2023
ti-chi-bot bot pushed a commit that referenced this issue Oct 23, 2023
ti-chi-bot bot pushed a commit that referenced this issue Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects 5.4.x versions. affects-6.1 affects-6.5 affects-7.1 affects-7.5 severity/major sig/execution SIG execution type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants