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

feat: put all temporary files in the same directory and clean them up #69

Merged
merged 1 commit into from
Apr 1, 2020

Conversation

Stebalien
Copy link
Member

Otherwise, if we repeatedly stop the same node, we'll collect a bunch of temporary files and NEVER DELETE them. This will:

  1. Waste space.
  2. Slow down queries/GC.

This patch:

  1. Moves all temporary files to a single .temp directory. The leading . means it can't conflict with any keys and queries (even on older flatfs versions) will skip it.
  2. Adds an "rm -rf flatfs-dir/.temp" call on start.

… on start

Otherwise, if we repeatedly stop the same node, we'll collect a bunch of
temporary files and NEVER DELETE them. This will:

1. Waste space.
2. Slow down queries/GC.

This patch:

1. Moves all temporary files to a single `.temp` directory. The leading `.`
means it can't conflict with any keys and queries (even on older flatfs
versions) will skip it.
2. Adds an "rm -rf flatfs-dir/.temp" call on start.
@Stebalien Stebalien requested a review from hsanjuan March 31, 2020 22:48
@Stebalien Stebalien changed the base branch from fix/loud-logging to master March 31, 2020 22:55
@Stebalien Stebalien marked this pull request as ready for review March 31, 2020 22:55
Copy link
Contributor

@hsanjuan hsanjuan left a comment

Choose a reason for hiding this comment

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

LGTM

@Stebalien Stebalien merged commit 86e95e6 into master Apr 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants