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

Fix wrong checkpoint info after restart #7801

Merged
merged 3 commits into from
Jul 13, 2023

Conversation

lidezhu
Copy link
Contributor

@lidezhu lidezhu commented Jul 12, 2023

What problem does this PR solve?

Issue Number: close #7799

Problem Summary: After disable uploading page data when do checkpoint, the data file id in manifest will be empty. And after restart, tiflash may try to recover from the latest manifest file and set a empty checkpoint location which is unexpected and will make tiflash crash in the next round of uploading checkpoint.

What is changed and how it works?

When restoring from manifest file at restart, check whether the data file id is empty before copy the checkpoint info to memory.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  1. deploy a cluster and load some data;
  2. restart and write more data, and then check whether tiflash will crash;
  • 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

@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/S Denotes a PR that changes 10-29 lines, ignoring generated files. do-not-merge/needs-triage-completed and removed do-not-merge/needs-linked-issue do-not-merge/needs-triage-completed labels Jul 12, 2023
@lidezhu
Copy link
Contributor Author

lidezhu commented Jul 13, 2023

/run-all-tests

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jul 13, 2023
Copy link
Contributor

@JaySon-Huang JaySon-Huang left a comment

Choose a reason for hiding this comment

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

LGTM with small comment

dbms/src/Storages/Page/V3/PageDirectory.cpp Show resolved Hide resolved
dbms/src/Storages/Page/V3/PageDirectory.cpp Outdated Show resolved Hide resolved
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jul 13, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JaySon-Huang, 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 [JaySon-Huang,Lloyd-Pottiger]

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 Jul 13, 2023
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jul 13, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-07-13 04:52:50.8088817 +0000 UTC m=+566862.579220412: ☑️ agreed by Lloyd-Pottiger.
  • 2023-07-13 06:10:26.805160338 +0000 UTC m=+571518.575499036: ☑️ agreed by JaySon-Huang.

@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 13, 2023
@lidezhu
Copy link
Contributor Author

lidezhu commented Jul 13, 2023

/run-all-tests

@lidezhu
Copy link
Contributor Author

lidezhu commented Jul 13, 2023

/run-unit-test

@ti-chi-bot ti-chi-bot bot merged commit a4f999a into pingcap:master Jul 13, 2023
@lidezhu lidezhu deleted the fix-upload-page branch July 13, 2023 07:27
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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RW Disaggregate with s3 tiflash crash for Unsupport type: Invalid
3 participants