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

space enlargement #9268

Closed
liufei26 opened this issue Dec 8, 2021 · 11 comments
Closed

space enlargement #9268

liufei26 opened this issue Dec 8, 2021 · 11 comments
Labels
question up-for-grabs Up for grabs waiting Waiting for a response from the issue creator.

Comments

@liufei26
Copy link

liufei26 commented Dec 8, 2021

Note: Please use Issues only for bug reports. For questions, discussions, feature requests, etc. post to dev group: https://groups.google.com/forum/#!forum/rocksdb or https://www.facebook.com/groups/rocksdb.dev

Expected behavior

compaction and input file is deleted.

Actual behavior

Why is there a space enlargement after a compaction is executed, and the input file is not deleted.

Steps to reproduce the behavior

full compaction

@hx235 hx235 added question up-for-grabs Up for grabs labels Dec 8, 2021
@hx235
Copy link
Contributor

hx235 commented Dec 9, 2021

Hi @liufei26, the input SST files might not be qualified for being deleted immediately when the compaction finishes as mentioned in https://github.com/facebook/rocksdb/wiki/Delete-Stale-Files. The link also provides some general info that can be helpful.

For further assistance if the wiki does not help, would you mind providing more context like log or code snippet if it's okay to do so?

Thanks!

@hx235 hx235 added the waiting Waiting for a response from the issue creator. label Dec 9, 2021
@liufei26
Copy link
Author

liufei26 commented Dec 9, 2021 via email

@hx235
Copy link
Contributor

hx235 commented Dec 9, 2021

Hi @liufei26 - is there any criteria defined by your need for a solution to be qualified as "better" or is there any specific pain-point of the restart method that you'd like to avoid?

Thanks!

@liufei26
Copy link
Author

liufei26 commented Dec 9, 2021 via email

@ajkr
Copy link
Contributor

ajkr commented Dec 9, 2021

Why is there a space enlargement after a compaction is executed, and the input file is not deleted.

Are you able to share the LOG file? I'd expect space enlargement during the compaction, but not after it completes with default options. Space enlargement during compaction can be mitigated with max_compaction_bytes.

Some non-default features like slow deletion (https://github.com/facebook/rocksdb/wiki/Slow-Deletion), calling DB::DisableFileDeletions(), or holding onto old iterators, can cause obsolete files to persist after the end of the compaction.

@liufei26
Copy link
Author

liufei26 commented Dec 10, 2021 via email

@hx235
Copy link
Contributor

hx235 commented Dec 10, 2021

@ liufei26 Did you attach the log already? I couldn't see it in your latest reply "this is part of my LOG, thank you."

@liufei26
Copy link
Author

liufei26 commented Dec 10, 2021 via email

@hx235
Copy link
Contributor

hx235 commented Dec 10, 2021

@liufei26 sorry I still can't see it - there is only "sorry, this". Seem like you are replying from email (?) Maybe try logging into Github and reply or paste the log directly in the issue page here #9268, if you haven't done so.

@liufei26
Copy link
Author

liufei26 commented Dec 11, 2021 via email

@hx235
Copy link
Contributor

hx235 commented Dec 11, 2021

@liufei26 - just realized my idea of copy-and-pasting the info log is probably a bad idea cuz it messed up the format a bit :p Would you mind attaching the LOG as a file from this issue page instead? Good thing though is at least we did see some of your log. Thanks!

@ajkr ajkr closed this as completed Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question up-for-grabs Up for grabs waiting Waiting for a response from the issue creator.
Projects
None yet
Development

No branches or pull requests

3 participants