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

bindinfo: add timeout for loading binding from storage #51550

Merged
merged 18 commits into from
Mar 12, 2024

Conversation

hawkingrei
Copy link
Member

@hawkingrei hawkingrei commented Mar 6, 2024

What problem does this PR solve?

Issue Number: ref #51347

Problem Summary:

What changed and how does it work?

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 do-not-merge/needs-linked-issue do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed do-not-merge/needs-linked-issue labels Mar 6, 2024
@hawkingrei
Copy link
Member Author

/retest

Copy link

codecov bot commented Mar 6, 2024

Codecov Report

Merging #51550 (d8c7622) into master (15947c1) will increase coverage by 2.1180%.
Report is 4 commits behind head on master.
The diff coverage is 76.9230%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #51550        +/-   ##
================================================
+ Coverage   70.7427%   72.8608%   +2.1180%     
================================================
  Files          1473       1473                
  Lines        436986     437972       +986     
================================================
+ Hits         309136     319110      +9974     
+ Misses       108511      98900      -9611     
- Partials      19339      19962       +623     
Flag Coverage Δ
integration 49.1051% <55.7692%> (?)
unit 70.5752% <76.9230%> (+0.0230%) ⬆️

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

Components Coverage Δ
dumpling 53.9957% <ø> (ø)
parser ∅ <ø> (∅)
br 51.4483% <ø> (+5.5786%) ⬆️

@hawkingrei hawkingrei changed the title bindinfo: add timeout for loading binding from storage bindinfo: add timeout for loading binding from storage [WIP] Mar 6, 2024
@hawkingrei
Copy link
Member Author

/retest

@hawkingrei hawkingrei force-pushed the add_timeout_for_load_binding branch from e04e9b8 to c5aa2db Compare March 7, 2024 07:57
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 7, 2024
@hawkingrei hawkingrei force-pushed the add_timeout_for_load_binding branch from 2f65e65 to 685f1f9 Compare March 7, 2024 09:08
@hawkingrei
Copy link
Member Author

/retest

@hawkingrei hawkingrei changed the title bindinfo: add timeout for loading binding from storage [WIP] bindinfo: add timeout for loading binding from storage Mar 7, 2024
@hawkingrei hawkingrei force-pushed the add_timeout_for_load_binding branch from ebb3d9e to b5f60c3 Compare March 8, 2024 00:21
@hawkingrei
Copy link
Member Author

/retest

@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 8, 2024
@hawkingrei hawkingrei force-pushed the add_timeout_for_load_binding branch from b25ac50 to c57f8d3 Compare March 10, 2024 09:19
@hawkingrei hawkingrei requested a review from qw4990 March 11, 2024 07:21
@hawkingrei hawkingrei force-pushed the add_timeout_for_load_binding branch 2 times, most recently from e7b7b99 to b898638 Compare March 11, 2024 10:43
hawkingrei and others added 10 commits March 12, 2024 17:28
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Co-authored-by: Yuanjia Zhang <qw4990@163.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
@hawkingrei hawkingrei force-pushed the add_timeout_for_load_binding branch from 5ad337e to dbf2229 Compare March 12, 2024 09:29
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Mar 12, 2024
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
return binding, matched, metrics.ScopeGlobal
}

Copy link
Contributor

Choose a reason for hiding this comment

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

means return binding, matched, nil at last?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, actually there have been no changes here.

pkg/bindinfo/binding_cache.go Outdated Show resolved Hide resolved
│ └─TableReader 6656.67 root data:Selection
│ └─Selection 6656.67 cop[tikv] ne(executor__merge_join.t1.c1, 1), not(isnull(executor__merge_join.t1.c1))
│ └─TableFullScan 10000.00 cop[tikv] table:t1 keep order:false, stats:pseudo
│ └─TableReader 6656.67 root data:Selection
Copy link
Contributor

Choose a reason for hiding this comment

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

why this is changed?

Copy link
Member Author

Choose a reason for hiding this comment

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

it has be reverted.

TableReader 0.00 root partition:dual data:Selection
└─Selection 0.00 cop[tikv] eq(executor__partition__partition_boundaries.t.a, 3000000)
└─TableFullScan 14.00 cop[tikv] table:t keep order:false
TableDual 0.00 root rows:0
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
Copy link

ti-chi-bot bot commented Mar 12, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AilinKid, easonn7, qw4990

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 ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Mar 12, 2024
Copy link

ti-chi-bot bot commented Mar 12, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-03-12 09:31:05.757466326 +0000 UTC m=+764292.779712714: ☑️ agreed by qw4990.
  • 2024-03-12 10:04:44.200743182 +0000 UTC m=+766311.222989571: ☑️ agreed by AilinKid.

@hawkingrei
Copy link
Member Author

/reteat

@hawkingrei
Copy link
Member Author

/retest

@ti-chi-bot ti-chi-bot bot merged commit 46e95f4 into pingcap:master Mar 12, 2024
22 of 23 checks passed
@hawkingrei
Copy link
Member Author

/retest

@hawkingrei hawkingrei deleted the add_timeout_for_load_binding branch March 13, 2024 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants