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

FAP: compute RU and match index and term when handling snapshot #8716

Merged
merged 15 commits into from
Jan 29, 2024

Conversation

CalvinNeo
Copy link
Member

@CalvinNeo CalvinNeo commented Jan 22, 2024

What problem does this PR solve?

Issue Number: ref #8673

Problem Summary:

What is changed and how it works?

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

None

Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed do-not-merge/needs-linked-issue labels Jan 22, 2024
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 22, 2024
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
@JinheLin
Copy link
Contributor

JinheLin commented Jan 24, 2024

Seems we don't need to calculate RU of FAP, because FAP is only helpful for scaling in/cout, but not for add tiflash replica?

@CalvinNeo
Copy link
Member Author

/hold proxy

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 25, 2024
@CalvinNeo
Copy link
Member Author

CalvinNeo commented Jan 25, 2024

Seems we don't need to calculate RU of FAP, because FAP is only helpful for scaling in/cout, but not for add tiflash replica?

The RU computing here is all observed size / replica count. Consider directly set replica from 0 to 2, so this could be total size * 2 / 2 which is total size.

I think the same thing could happen with FAP.

Meanwhile, the is_syncing flag marks if whether the fap is used in 0 -> 2 or 0 -> 1.

@JinheLin

Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
@CalvinNeo CalvinNeo changed the title Compute RU when applying fap snapshot FAP: compute RU and match index and term when handling snapshot Jan 26, 2024
@CalvinNeo
Copy link
Member Author

/run-all-tests

@CalvinNeo
Copy link
Member Author

/rebuild

@CalvinNeo
Copy link
Member Author

/run-all-tests

Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
@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 Jan 26, 2024
b
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 26, 2024
Copy link
Contributor

ti-chi-bot bot commented Jan 26, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JinheLin, Lloyd-Pottiger

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:
  • OWNERS [JinheLin,Lloyd-Pottiger]

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

Copy link
Contributor

ti-chi-bot bot commented Jan 26, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-01-22 07:23:45.756938519 +0000 UTC m=+772667.321236217: ☑️ agreed by Lloyd-Pottiger.
  • 2024-01-26 06:10:36.323266695 +0000 UTC m=+1113877.887564397: ☑️ agreed by JinheLin.

@CalvinNeo
Copy link
Member Author

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 29, 2024
@CalvinNeo
Copy link
Member Author

/run-all-tests

@CalvinNeo
Copy link
Member Author

/run-all-tests

@ti-chi-bot ti-chi-bot bot merged commit 4336a53 into pingcap:master Jan 29, 2024
6 checks passed
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/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.

4 participants