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

Run compaction every dbclean interval #834

Merged
merged 1 commit into from
Dec 17, 2024
Merged

Conversation

CircuitCoder
Copy link
Contributor

Description

Run nedb compaction every dbclean interval. nedb only appends a deleted tag for data deletion, so deleting data won't shrink the on-disk datastore size. Compaction rewrites the entire DB into datastore.

This was originally intended to fix #399, #645, but that was apparently already fixed in af8de75. However, it's still in theory for other datastores to write too much stuff into datastores (e.g. feed), so compaction after db cleanup should help.

Related Issue

#399, #645.
#399 (comment) also mentioned the transmission log, which doesn't seem to be managed by nedb. That is out-of-scope of this PR.

Types of changes

  • Breaking change (changes that break backward compatibility of public API or CLI - semver MAJOR)
  • New feature (non-breaking change which adds functionality - semver MINOR)
  • Bug fix (non-breaking change which fixes an issue - semver PATCH)

@trim21 trim21 enabled auto-merge (squash) December 17, 2024 18:45
@trim21 trim21 merged commit 99a1b6b into jesec:master Dec 17, 2024
17 checks passed
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.

Uncaught exception: Error: Cannot create a string longer than 0x1fffffe8 characters
2 participants