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

ddl notifier: use pagination for SELECT to reduce memory usage (#58376) (#58488) #59217

Open
wants to merge 8 commits into
base: release-8.5-20250114-v8.5.0
Choose a base branch
from

Conversation

ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #58488

This is an automated cherry-pick of #58376

What problem does this PR solve?

Issue Number: close #58368
close #58869

Problem Summary:

What changed and how does it work?

as title. refine the Store.List.

// Store is the (de)serialization and persistent layer.
type Store interface {
...
	// List will start a transaction of given session and read all schema changes
	// through a ListResult. The ownership of session is occupied Store until CloseFn
	// is called.
	List(ctx context.Context, se *sess.Session) ListResult
}

// ListResult is the result stream of a List operation.
type ListResult interface {
	// Read tries to decode at most `len(changes)` SchemaChange into given slices. It
	// returns the number of schemaChanges decoded, 0 means no more schemaChanges.
	//
	// Note that the previous SchemaChange in the slice will be overwritten when call
	// Read.
	Read(changes []*SchemaChange) (int, error)
}

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

Sorry, something went wrong.

@ti-chi-bot ti-chi-bot added 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. type/cherry-pick-for-release-8.5-20250114-v8.5.0 labels Jan 27, 2025
Copy link
Member

@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.

Thanks! :shipit:

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jan 27, 2025
Copy link

codecov bot commented Jan 27, 2025

Codecov Report

Attention: Patch coverage is 85.95041% with 17 lines in your changes missing coverage. Please review.

Please upload report for BASE (release-8.5-20250114-v8.5.0@04a27be). Learn more about missing BASE report.

Additional details and impacted files
@@                       Coverage Diff                        @@
##             release-8.5-20250114-v8.5.0     #59217   +/-   ##
================================================================
  Coverage                               ?   57.3685%           
================================================================
  Files                                  ?       1778           
  Lines                                  ?     630753           
  Branches                               ?          0           
================================================================
  Hits                                   ?     361854           
  Misses                                 ?     243898           
  Partials                               ?      25001           
Flag Coverage Δ
integration 37.6579% <72.7272%> (?)
unit 72.4323% <85.9504%> (?)

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

Components Coverage Δ
dumpling 52.8711% <0.0000%> (?)
parser ∅ <0.0000%> (?)
br 55.5948% <0.0000%> (?)

Copy link

ti-chi-bot bot commented Jan 27, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lance6716, Rustin170506

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 approved lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 27, 2025
Copy link

ti-chi-bot bot commented Jan 27, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-01-27 06:27:31.319549142 +0000 UTC m=+680578.650468546: ☑️ agreed by Rustin170506.
  • 2025-01-27 06:58:35.004618182 +0000 UTC m=+682442.335537601: ☑️ agreed by lance6716.

@Rustin170506
Copy link
Member

/retest

1 similar comment
@lance6716
Copy link
Contributor

/retest

Copy link

ti-chi-bot bot commented Feb 5, 2025

@ti-chi-bot: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
idc-jenkins-ci-tidb/mysql-test cf7c3a0 link true /test mysql-test
pull-br-integration-test cf7c3a0 link true /test pull-br-integration-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-sigs/prow repository. I understand the commands that are listed here.

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. type/cherry-pick-for-release-8.5-20250114-v8.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants