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

statistics: handle lock and unlock operations correctly #56454

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Rustin170506
Copy link
Member

@Rustin170506 Rustin170506 commented Oct 5, 2024

What problem does this PR solve?

Issue Number: ref #55906

Problem Summary:

What changed and how does it work?

This PR is based on #56437

Handle the lock and unlock operations correctly.

  1. When we unlock the tables, we need to update the version in order to trigger an update, allowing the priority queue to check the latest count and the modify_count.
  2. When we lock the tables, we need to update the version as well. This lets the priority queue know that the table has been changed, and we need to evaluate it again.
  3. In the priority queue, when we enqueue the table, we will check if this table has been locked or unlocked.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

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 Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Oct 5, 2024
Copy link

codecov bot commented Oct 5, 2024

Codecov Report

Attention: Patch coverage is 52.87356% with 41 lines in your changes missing coverage. Please review.

Project coverage is 56.4439%. Comparing base (fa723c3) to head (bc8c0e9).

Additional details and impacted files
@@                Coverage Diff                @@
##             master     #56454         +/-   ##
=================================================
- Coverage   73.3500%   56.4439%   -16.9061%     
=================================================
  Files          1629       1779        +150     
  Lines        450090     636990     +186900     
=================================================
+ Hits         330141     359542      +29401     
- Misses        99710     252872     +153162     
- Partials      20239      24576       +4337     
Flag Coverage Δ
integration 38.0533% <10.3448%> (?)
unit 72.4726% <52.8735%> (-0.0110%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.9478% <ø> (ø)
parser ∅ <ø> (∅)
br 52.4037% <ø> (+6.8243%) ⬆️

@Rustin170506 Rustin170506 force-pushed the rustin-patch-lock-unlock-table branch 3 times, most recently from 602f8ef to c1025de Compare October 7, 2024 05:25
@ti-chi-bot ti-chi-bot bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 11, 2024
Copy link

ti-chi-bot bot commented Oct 11, 2024

PR needs rebase.

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-sigs/prow repository.

@ti-chi-bot ti-chi-bot bot removed the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Oct 14, 2024
Copy link

ti-chi-bot bot commented Oct 14, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from rustin170506, ensuring that each of them provides their approval before proceeding. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 ti-chi-bot bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Oct 14, 2024
@Rustin170506 Rustin170506 removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 14, 2024
@Rustin170506 Rustin170506 force-pushed the rustin-patch-lock-unlock-table branch 3 times, most recently from 3233a85 to c7f1fa5 Compare October 14, 2024 06:35
@Rustin170506
Copy link
Member Author

/retest

@Rustin170506 Rustin170506 force-pushed the rustin-patch-lock-unlock-table branch 3 times, most recently from 30d62ab to 0aeb71a Compare October 15, 2024 13:46
Copy link
Member Author

@Rustin170506 Rustin170506 left a comment

Choose a reason for hiding this comment

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

🔢 Self-check (PR reviewed by myself and ready for feedback.)

Copy link
Member Author

@Rustin170506 Rustin170506 left a comment

Choose a reason for hiding this comment

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

🔢 Self-check (PR reviewed by myself and ready for feedback.)

@Rustin170506
Copy link
Member Author

/retest

@Rustin170506 Rustin170506 requested review from elsa0520 and removed request for qw4990 October 17, 2024 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/statistics release-note-none Denotes a PR that doesn't merit a release note. sig/planner SIG: Planner size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant