Skip to content

br: skip incomplete metakv#61734

Merged
ti-chi-bot[bot] merged 2 commits intopingcap:masterfrom
Leavrth:skip_incomplete_metakv
Jun 16, 2025
Merged

br: skip incomplete metakv#61734
ti-chi-bot[bot] merged 2 commits intopingcap:masterfrom
Leavrth:skip_incomplete_metakv

Conversation

@Leavrth
Copy link
Copy Markdown
Contributor

@Leavrth Leavrth commented Jun 13, 2025

What problem does this PR solve?

Issue Number: close #61728 close #61731

Problem Summary:
the incomplete metakv cannot be restored

What changed and how does it work?

skip the incomplete metakv

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

Signed-off-by: Jianjun Liao <jianjun.liao@outlook.com>
@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-tests-checked release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/needs-triage-completed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed do-not-merge/needs-tests-checked labels Jun 13, 2025
@tiprow
Copy link
Copy Markdown

tiprow bot commented Jun 13, 2025

Hi @Leavrth. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Details

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
Copy link
Copy Markdown

ti-chi-bot bot commented Jun 13, 2025

@Leavrth: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-integration-e2e-test-next-gen a3600c3 link false /test pull-integration-e2e-test-next-gen

Full PR test history. Your PR dashboard.

Details

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.

@codecov
Copy link
Copy Markdown

codecov bot commented Jun 13, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 39 lines in your changes missing coverage. Please review.

Project coverage is 74.9112%. Comparing base (3c7a2a2) to head (a684ec2).
Report is 7 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #61734        +/-   ##
================================================
+ Coverage   73.1141%   74.9112%   +1.7971%     
================================================
  Files          1730       1746        +16     
  Lines        481167     482774      +1607     
================================================
+ Hits         351801     361652      +9851     
+ Misses       107845      98872      -8973     
- Partials      21521      22250       +729     
Flag Coverage Δ
integration 46.2443% <30.7692%> (?)
unit 72.5160% <38.4615%> (+0.1596%) ⬆️

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

Components Coverage Δ
dumpling 52.7804% <ø> (ø)
parser ∅ <ø> (∅)
br 62.8758% <50.0000%> (+15.8903%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

// the meta kv may not be backed by log restore
if checkTableIDLost(tableId) {
if checkTableIdLost(tableId) {
log.Warn("the table is lost in the log backup storage, so that it can not be restored.", zap.Int64("table id", tableId))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maybe use Info level? as this is expected, and maybe rephrase the log message, I feel like it might be a bit concerning to see this log if people don't have context

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Maybe the tableId is included in the --filter, and the user want to restore it. However, finally it is not restored.

dbId, dbNameByDbId(dbId), restoredTs, restoreCommitTs, startTs)
}
// the meta kv may not be backed by log restore
if checkDBIdlost(dbId) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

actually do we need this check since it can lost for a reason? how about just keep the tracker check

SnapshotBackupTs uint64 `protobuf:"varint,2,opt,name=snapshot_backup_ts,proto3"`
// TableIDs records the table IDs blocklist of the cluster running the log backup task.
// RewriteTs records the rewritten timestamp of the meta kvs in this PITR restore.
RewriteTs uint64 `protobuf:"varint,6,opt,name=rewrite_ts,proto3"`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

hmm, what's the difference between RewriteTs and RestoreCommitTs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

RestoreCommitTs > RewriteTs
Therefore, RestoreCommitTs is newer than the timestamp of any kv that is restored by log restore.

Signed-off-by: Jianjun Liao <jianjun.liao@outlook.com>
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jun 16, 2025
@Tristan1900
Copy link
Copy Markdown
Contributor

/lgtm
/hold
for one unaddressed comment

@ti-chi-bot ti-chi-bot bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jun 16, 2025
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot bot commented Jun 16, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-06-16 11:15:53.924141777 +0000 UTC m=+97606.647320756: ☑️ agreed by 3pointer.
  • 2025-06-16 12:43:15.685094265 +0000 UTC m=+102848.408273246: ☑️ agreed by Tristan1900.

@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot bot commented Jun 16, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 3pointer, Tristan1900

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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

@Tristan1900
Copy link
Copy Markdown
Contributor

/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 Jun 16, 2025
@ti-chi-bot ti-chi-bot bot merged commit f46112d into pingcap:master Jun 16, 2025
31 of 33 checks passed
@Tristan1900
Copy link
Copy Markdown
Contributor

/cherrypick release-8.5-20250114-v8.5.0

@ti-chi-bot
Copy link
Copy Markdown
Member

@Tristan1900: new pull request created to branch release-8.5-20250114-v8.5.0: #61762.

Details

In response to this:

/cherrypick release-8.5-20250114-v8.5.0

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 ti-community-infra/tichi repository.

Leavrth added a commit to Leavrth/tidb that referenced this pull request Dec 12, 2025
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/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PiTR still fail after respecify the filter that does not contain the table PiTR fail, error: the default cf kv is lost when there is its write cf kv

4 participants