Skip to content

log restore: filter backupmeta file by ts to speed up pitr (#61347)#62115

Merged
ti-chi-bot[bot] merged 4 commits intopingcap:release-8.5from
ti-chi-bot:cherry-pick-61347-to-release-8.5
Jul 10, 2025
Merged

log restore: filter backupmeta file by ts to speed up pitr (#61347)#62115
ti-chi-bot[bot] merged 4 commits intopingcap:release-8.5from
ti-chi-bot:cherry-pick-61347-to-release-8.5

Conversation

@ti-chi-bot
Copy link
Copy Markdown
Member

This is an automated cherry-pick of #61347

What problem does this PR solve?

Issue Number: ref #61318

Problem Summary:

  1. As described in the issue.

What changed and how does it work?

  1. Improved timestamp-based filtering logic for pitr .
  2. Ensured compatibility with previous and future versions of TiKV by gracefully handling unexpected or legacy formats.

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.

Support filtering log backup meta files by timestamp to improve PITR performance.

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot ti-chi-bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. type/cherry-pick-for-release-8.5 This PR is cherry-picked to release-8.5 from a source PR. labels Jul 1, 2025
@ti-chi-bot
Copy link
Copy Markdown
Member Author

@3pointer This PR has conflicts, I have hold it.
Please resolve them or ask others to resolve them, then comment /unhold to remove the hold label.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 9, 2025

Codecov Report

Attention: Patch coverage is 76.19048% with 25 lines in your changes missing coverage. Please review.

Please upload report for BASE (release-8.5@4caea03). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff                @@
##             release-8.5     #62115   +/-   ##
================================================
  Coverage               ?   57.7814%           
================================================
  Files                  ?       1777           
  Lines                  ?     630817           
  Branches               ?          0           
================================================
  Hits                   ?     364495           
  Misses                 ?     241698           
  Partials               ?      24624           
Flag Coverage Δ
integration 38.3349% <52.3809%> (?)
unit 72.7889% <76.1904%> (?)

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

Components Coverage Δ
dumpling 52.9278% <0.0000%> (?)
parser ∅ <0.0000%> (?)
br 63.8007% <0.0000%> (?)
🚀 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.

@ti-chi-bot ti-chi-bot Bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jul 9, 2025
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented Jul 10, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BornChanger, Leavrth

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

@ti-chi-bot ti-chi-bot Bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jul 10, 2025
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented Jul 10, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-07-09 08:33:25.642079387 +0000 UTC m=+2075058.365258369: ☑️ agreed by BornChanger.
  • 2025-07-10 05:46:33.009892122 +0000 UTC m=+2151445.733071101: ☑️ agreed by Leavrth.

@3pointer
Copy link
Copy Markdown
Contributor

/test unit-test

@tiprow
Copy link
Copy Markdown

tiprow Bot commented Jul 10, 2025

@3pointer: No presubmit jobs available for pingcap/tidb@release-8.5

Details

In response to this:

/test unit-test

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.

@3pointer
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 Jul 10, 2025
@3pointer
Copy link
Copy Markdown
Contributor

/test unit-test

@tiprow
Copy link
Copy Markdown

tiprow Bot commented Jul 10, 2025

@3pointer: No presubmit jobs available for pingcap/tidb@release-8.5

Details

In response to this:

/test unit-test

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.

@3pointer
Copy link
Copy Markdown
Contributor

/test unit-test

FAIL: //pkg/server/handler/tests:tests_test (shard 10 of 39) (see /home/jenkins/.tidb/tmp/b02793c799fc405e3b616c63a86b7eb2/execroot/main/bazel-out/k8-fastbuild/testlogs/pkg/server/handler/tests/tests_test/shard_10_of_39/test_attempts/attempt_1.log)

@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented Jul 10, 2025

@3pointer: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

/test build
/test check-dev
/test check-dev2
/test mysql-test
/test pull-br-integration-test
/test pull-unit-test-ddlv1
/test unit-test

The following commands are available to trigger optional jobs:

/test pull-common-test
/test pull-e2e-test
/test pull-integration-common-test
/test pull-integration-copr-test
/test pull-integration-ddl-test
/test pull-integration-e2e-test
/test pull-integration-jdbc-test
/test pull-integration-mysql-test
/test pull-integration-nodejs-test
/test pull-integration-python-orm-test
/test pull-integration-tidb-tools-test
/test pull-lightning-integration-test
/test pull-mysql-client-test
/test pull-sqllogic-test
/test pull-tiflash-test

Use /test all to run the following jobs that were automatically triggered:

pingcap/tidb/release-8.5/pull_br_integration_test
pingcap/tidb/release-8.5/pull_build
pingcap/tidb/release-8.5/pull_check
pingcap/tidb/release-8.5/pull_check2
pingcap/tidb/release-8.5/pull_mysql_test
pingcap/tidb/release-8.5/pull_unit_test
Details

In response to this:

/test unit-test

FAIL: //pkg/server/handler/tests:tests_test (shard 10 of 39) (see /home/jenkins/.tidb/tmp/b02793c799fc405e3b616c63a86b7eb2/execroot/main/bazel-out/k8-fastbuild/testlogs/pkg/server/handler/tests/tests_test/shard_10_of_39/test_attempts/attempt_1.log)

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.

@tiprow
Copy link
Copy Markdown

tiprow Bot commented Jul 10, 2025

@3pointer: No presubmit jobs available for pingcap/tidb@release-8.5

Details

In response to this:

/test unit-test

FAIL: //pkg/server/handler/tests:tests_test (shard 10 of 39) (see /home/jenkins/.tidb/tmp/b02793c799fc405e3b616c63a86b7eb2/execroot/main/bazel-out/k8-fastbuild/testlogs/pkg/server/handler/tests/tests_test/shard_10_of_39/test_attempts/attempt_1.log)

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.

@tiprow
Copy link
Copy Markdown

tiprow Bot commented Jul 10, 2025

@ti-chi-bot[bot]: No presubmit jobs available for pingcap/tidb@release-8.5

Details

In response to this:

@3pointer: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

/test build
/test check-dev
/test check-dev2
/test mysql-test
/test pull-br-integration-test
/test pull-unit-test-ddlv1
/test unit-test

The following commands are available to trigger optional jobs:

/test pull-common-test
/test pull-e2e-test
/test pull-integration-common-test
/test pull-integration-copr-test
/test pull-integration-ddl-test
/test pull-integration-e2e-test
/test pull-integration-jdbc-test
/test pull-integration-mysql-test
/test pull-integration-nodejs-test
/test pull-integration-python-orm-test
/test pull-integration-tidb-tools-test
/test pull-lightning-integration-test
/test pull-mysql-client-test
/test pull-sqllogic-test
/test pull-tiflash-test

Use /test all to run the following jobs that were automatically triggered:

pingcap/tidb/release-8.5/pull_br_integration_test
pingcap/tidb/release-8.5/pull_build
pingcap/tidb/release-8.5/pull_check
pingcap/tidb/release-8.5/pull_check2
pingcap/tidb/release-8.5/pull_mysql_test
pingcap/tidb/release-8.5/pull_unit_test

In response to this:

/test unit-test

FAIL: //pkg/server/handler/tests:tests_test (shard 10 of 39) (see /home/jenkins/.tidb/tmp/b02793c799fc405e3b616c63a86b7eb2/execroot/main/bazel-out/k8-fastbuild/testlogs/pkg/server/handler/tests/tests_test/shard_10_of_39/test_attempts/attempt_1.log)

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.

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.

@3pointer
Copy link
Copy Markdown
Contributor

/retest

@3pointer
Copy link
Copy Markdown
Contributor

/test unit-test

@tiprow
Copy link
Copy Markdown

tiprow Bot commented Jul 10, 2025

@3pointer: No presubmit jobs available for pingcap/tidb@release-8.5

Details

In response to this:

/test unit-test

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 ti-chi-bot Bot merged commit c780f4e into pingcap:release-8.5 Jul 10, 2025
23 checks passed
ClamChowderTiDB added a commit to ClamChowderTiDB/tidb that referenced this pull request Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved cherry-pick-approved Cherry pick PR approved by release team. lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. type/cherry-pick-for-release-8.5 This PR is cherry-picked to release-8.5 from a source PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants