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

[Dynamic Regions] many sst files left in the import directory after br restore #15461

Closed
glorv opened this issue Aug 29, 2023 · 4 comments · Fixed by #15538
Closed

[Dynamic Regions] many sst files left in the import directory after br restore #15461

glorv opened this issue Aug 29, 2023 · 4 comments · Fixed by #15538
Assignees
Labels
severity/major type/bug The issue is confirmed as a bug.

Comments

@glorv
Copy link
Contributor

glorv commented Aug 29, 2023

Bug Report

What version of TiKV are you using?

nightly

What operating system and CPU are you using?

Steps to reproduce

I used br to restore about 500GB data into a fresh cluster with partition-raft-kv enabled. After br finished I found there were about 1200 sst filed under the import dir with a total size about 55GB. And after 24h, these sst files were still not cleaned up.

And when I restart the cluster I could see a lot of ingest sst operations in the tikv log. This also make the restart much longer than expected before the foreground qps is stable.

What did you expect?

No or little sst files should be left for a long time after br restore.

What did happened?

@glorv
Copy link
Contributor Author

glorv commented Aug 29, 2023

@overvenus @tonyxuqqi @SpadeA-Tang Do you have any suggestions?
Also cc @3pointer

@glorv glorv changed the title raftstore-v2: many sst files in the import directory left after br restore [Dynamic Regions] many sst files in the import directory left after br restore Aug 29, 2023
@glorv glorv changed the title [Dynamic Regions] many sst files in the import directory left after br restore [Dynamic Regions] many sst files left in the import directory after br restore Aug 29, 2023
@overvenus
Copy link
Member

As discussed offline, one possible solution to this issue is that TiKV can periodically (or triggered by ingest sst event) manual-flush tablet so that flushed index can be advanced in time, as described in #14914

@tonyxuqqi
Copy link
Contributor

As discussed offline, one possible solution to this issue is that TiKV can periodically (or triggered by ingest sst event) manual-flush tablet so that flushed index can be advanced in time, as described in #14914

@overvenus The problem is if there's no memtable, then flush will not help.

@tonyxuqqi tonyxuqqi assigned glorv and unassigned overvenus Sep 5, 2023
ti-chi-bot bot pushed a commit that referenced this issue Sep 5, 2023
ref #15461

limit the flush times during server stop

Signed-off-by: SpadeA-Tang <[email protected]>
@overvenus
Copy link
Member

As discussed offline, one possible solution to this issue is that TiKV can periodically (or triggered by ingest sst event) manual-flush tablet so that flushed index can be advanced in time, as described in #14914

@overvenus The problem is if there's no memtable, then flush will not help.

It does not matter whether there is a memtable or not, once (synchronously) manual-flushed is done, we know all changes that are less or equal to the modified index are persisted to disk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/major type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants