Skip to content

sst_importer: set fill cache to false when merge downloaded SST files#19229

Merged
ti-chi-bot[bot] merged 1 commit intotikv:masterfrom
Leavrth:fill_cache
Dec 29, 2025
Merged

sst_importer: set fill cache to false when merge downloaded SST files#19229
ti-chi-bot[bot] merged 1 commit intotikv:masterfrom
Leavrth:fill_cache

Conversation

@Leavrth
Copy link
Contributor

@Leavrth Leavrth commented Dec 24, 2025

What is changed and how it works?

Issue Number: Close #19228

What's Changed:

set fill cache to false when merge downloaded SST files

Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:
  • Need to cherry-pick to the release branch

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

Release note

None

Signed-off-by: Jianjun Liao <jianjun.liao@outlook.com>
Copilot AI review requested due to automatic review settings December 24, 2025 02:39
@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-triage-completed release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has signed the dco. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 24, 2025
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved and removed do-not-merge/needs-triage-completed labels Dec 24, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses a memory usage issue during PITR (Point-in-Time Recovery) restore operations by setting fill_cache to false when creating iterators over downloaded SST files. This prevents the RocksDB block cache from being populated with data that is only read once during the merge operation, reducing memory consumption during restore.

  • Sets fill_cache to false for SST file iterators during merge operations
  • Reduces memory pressure during PITR restore by avoiding unnecessary cache population

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ti-chi-bot ti-chi-bot bot added the lgtm label Dec 24, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Dec 24, 2025

[APPROVALNOTIFIER] This PR is APPROVED

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

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 removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Dec 24, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Dec 24, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-12-24 02:39:40.366465103 +0000 UTC m=+2218325.180242665: ☑️ agreed by YuJuncen.
  • 2025-12-24 07:37:13.352484167 +0000 UTC m=+2236178.166261738: ☑️ agreed by 3pointer.

@Leavrth
Copy link
Contributor Author

Leavrth commented Dec 24, 2025

/retest

1 similar comment
@Leavrth
Copy link
Contributor Author

Leavrth commented Dec 29, 2025

/retest

@ti-chi-bot ti-chi-bot bot merged commit 0c1fe2a into tikv:master Dec 29, 2025
13 of 19 checks passed
@ti-chi-bot ti-chi-bot bot added this to the Pool milestone Dec 29, 2025
@Leavrth Leavrth added the needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. label Dec 29, 2025
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.5: #19246.

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Dec 29, 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-unit-test 6949073 link unknown /test pull-unit-test

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.

YuJuncen pushed a commit to YuJuncen/tikv that referenced this pull request Dec 31, 2025
…tikv#19229)

close tikv#19228

set fill cache to false when merge downloaded SST files

Signed-off-by: Jianjun Liao <jianjun.liao@outlook.com>
YuJuncen added a commit that referenced this pull request Dec 31, 2025
* sst_importer: set fill cache to false when merge downloaded SST files (#19229)

close #19228

set fill cache to false when merge downloaded SST files

Signed-off-by: Jianjun Liao <jianjun.liao@outlook.com>

* sst_importer: ensure cleanup of temporary files on error (#19240)

ref #17283, close #19239

sst_importer: enhance failpoint handling and ensure cleanup of temporary files on error

- Ensure temporary files are cleaned up when a download fails in sst_importer
- Add a new failpoint `download_files_ext_after_download` to inject errors right after batch downloads complete, improving test coverage of cleanup paths

Signed-off-by: Juncen Yu <yujuncen@pingcap.com>

* Squashed commit of the following:

commit 5a14b2b
Author: Juncen Yu <yujuncen@pingcap.com>
Date:   Mon Dec 29 15:11:06 2025 +0800

    make clippy happy

    Signed-off-by: Juncen Yu <yujuncen@pingcap.com>

commit ace595e
Merge: bd5bff3 147cacc
Author: Juncen Yu <yujuncen@pingcap.com>
Date:   Fri Dec 26 17:51:36 2025 +0800

    Merge branch 'master' of https://github.com/tikv/tikv into resolve-compact-conflict

commit bd5bff3
Merge: fde14ce 301984c
Author: Juncen Yu <yujuncen@pingcap.com>
Date:   Mon Dec 22 12:10:59 2025 +0800

    Merge branch 'master' of https://github.com/tikv/tikv into resolve-compact-conflict

    Signed-off-by: Juncen Yu <yujuncen@pingcap.com>

commit fde14ce
Author: Juncen Yu <yujuncen@pingcap.com>
Date:   Tue Mar 18 15:44:06 2025 +0800

    added more checks

    Signed-off-by: Juncen Yu <yujuncen@pingcap.com>

commit d0801cb
Author: Juncen Yu <yujuncen@pingcap.com>
Date:   Tue Mar 18 15:27:14 2025 +0800

    added more case about collapsed rollback

    Signed-off-by: Juncen Yu <yujuncen@pingcap.com>

commit 6d2b994
Author: Juncen Yu <yujuncen@pingcap.com>
Date:   Tue Mar 18 14:52:40 2025 +0800

    compact-log-backup: try to resolve conflict encountering during compacting

    Signed-off-by: Juncen Yu <yujuncen@pingcap.com>

Signed-off-by: Juncen Yu <yujuncen@pingcap.com>

* *: upgrade cargo-deny version to make it compatible to further developments.

Signed-off-by: lucasliang <nkcs_lykx@hotmail.com>

---------

Signed-off-by: Jianjun Liao <jianjun.liao@outlook.com>
Signed-off-by: Juncen Yu <yujuncen@pingcap.com>
Signed-off-by: lucasliang <nkcs_lykx@hotmail.com>
Co-authored-by: Jianjun Liao <36503113+Leavrth@users.noreply.github.com>
Co-authored-by: lucasliang <nkcs_lykx@hotmail.com>
ti-chi-bot bot pushed a commit that referenced this pull request Jan 5, 2026
…#19229) (#19246)

close #19228

set fill cache to false when merge downloaded SST files

Signed-off-by: Jianjun Liao <jianjun.liao@outlook.com>

Co-authored-by: Jianjun Liao <jianjun.liao@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved dco-signoff: yes Indicates the PR's author has signed the dco. lgtm needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

set fill cache to false when merge downloaded sst

5 participants