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

planner: simplify StatsCacheInner #45256

Merged
merged 8 commits into from Jul 10, 2023

Conversation

qw4990
Copy link
Contributor

@qw4990 qw4990 commented Jul 10, 2023

What problem does this PR solve?

Issue Number: ref #44461

Problem Summary: planner: simplify StatsCacheInner

What is changed and how it works?

planner: simplify StatsCacheInner

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

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

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot bot added release-note-none do-not-merge/needs-linked-issue do-not-merge/needs-triage-completed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 10, 2023
@qw4990 qw4990 added sig/planner SIG: Planner and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 10, 2023
@tiprow
Copy link

tiprow bot commented Jul 10, 2023

Hi @qw4990. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

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 kubernetes/test-infra repository.

@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed do-not-merge/needs-linked-issue do-not-merge/needs-triage-completed labels Jul 10, 2023
@hawkingrei
Copy link
Member

/ok-to-test

@qw4990
Copy link
Contributor Author

qw4990 commented Jul 10, 2023

/test check-dev

@tiprow
Copy link

tiprow bot commented Jul 10, 2023

@qw4990: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test tiprow_fast_test

Use /test all to run all jobs.

In response to this:

/test check-dev

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 kubernetes/test-infra repository.

@ti-chi-bot ti-chi-bot bot deleted a comment from ti-chi-bot Jul 10, 2023
@@ -72,6 +73,9 @@ func NewStatsCache() *StatsCache {
// StatsCache caches the tables in memory for Handle.
type StatsCache struct {
c internal.StatsCacheInner
// the max table stats version the cache has in its lifecycle.
maxTblStatsVer uint64
Copy link
Contributor

Choose a reason for hiding this comment

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

What about making it an atomic?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

statistics/handle/cache/statscacheinner.go Show resolved Hide resolved
@ti-chi-bot ti-chi-bot bot deleted a comment from ti-chi-bot Jul 10, 2023
@ti-chi-bot ti-chi-bot bot deleted a comment from ti-chi-bot Jul 10, 2023
@hawkingrei
Copy link
Member

/test all

@ti-chi-bot ti-chi-bot bot deleted a comment from ti-chi-bot Jul 10, 2023
@qw4990
Copy link
Contributor Author

qw4990 commented Jul 10, 2023

/test tiprow_fast_test

@ti-chi-bot
Copy link

ti-chi-bot bot commented Jul 10, 2023

@qw4990: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test build
  • /test canary-scan-security
  • /test check-dev
  • /test check-dev2
  • /test mysql-test
  • /test pingcap/tidb/canary_ghpr_unit_test
  • /test pull-br-integration-test
  • /test pull-e2e-test
  • /test pull-integration-copr-test
  • /test pull-integration-jdbc-test
  • /test pull-integration-mysql-test
  • /test unit-test

Use /test all to run the following jobs that were automatically triggered:

  • pingcap/tidb/ghpr_build
  • pingcap/tidb/ghpr_check
  • pingcap/tidb/ghpr_check2
  • pingcap/tidb/ghpr_mysql_test
  • pingcap/tidb/ghpr_unit_test

In response to this:

/test tiprow_fast_test

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 kubernetes/test-infra repository.

@hawkingrei
Copy link
Member

/retest

1 similar comment
@hawkingrei
Copy link
Member

/retest

@hawkingrei
Copy link
Member

/test tiprow_fast_test

@ti-chi-bot
Copy link

ti-chi-bot bot commented Jul 10, 2023

@hawkingrei: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test build
  • /test canary-scan-security
  • /test check-dev
  • /test check-dev2
  • /test mysql-test
  • /test pingcap/tidb/canary_ghpr_unit_test
  • /test pull-br-integration-test
  • /test pull-e2e-test
  • /test pull-integration-copr-test
  • /test pull-integration-jdbc-test
  • /test pull-integration-mysql-test
  • /test unit-test

Use /test all to run the following jobs that were automatically triggered:

  • pingcap/tidb/ghpr_build
  • pingcap/tidb/ghpr_check
  • pingcap/tidb/ghpr_check2
  • pingcap/tidb/ghpr_mysql_test
  • pingcap/tidb/ghpr_unit_test

In response to this:

/test tiprow_fast_test

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 kubernetes/test-infra repository.

@tiprow
Copy link

tiprow bot commented Jul 10, 2023

@qw4990: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
tiprow_fast_test c886c6e link true /test tiprow_fast_test

Full PR test history. Your PR dashboard.

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 kubernetes/test-infra repository. I understand the commands that are listed here.

@ti-chi-bot
Copy link

ti-chi-bot bot commented Jul 10, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chrysan, hawkingrei

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

The pull request process is described here

Needs approval from an approver in each of these files:

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

@ti-chi-bot
Copy link

ti-chi-bot bot commented Jul 10, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-07-10 10:15:31.629637343 +0000 UTC m=+327023.399976126: ☑️ agreed by chrysan.
  • 2023-07-10 10:29:31.838496742 +0000 UTC m=+327863.608835455: ☑️ agreed by hawkingrei.

@ti-chi-bot ti-chi-bot bot merged commit cac0db2 into pingcap:master Jul 10, 2023
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm ok-to-test release-note-none sig/planner SIG: Planner size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants