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

tbc: disable compressionin databases #471

Open
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

marcopeereboom
Copy link
Contributor

Summary
The snappy compression does not really help disk space but does use significant CPU. Disable it and roll db to v3.

Changes

@marcopeereboom marcopeereboom requested a review from a team as a code owner March 28, 2025 12:43
@github-actions github-actions bot added the area: tbc This is a change to TBC (Tiny Bitcoin) label Mar 28, 2025
@marcopeereboom marcopeereboom added type: enhancement This improves existing functionality size: L This change is large (+/- <500) labels Mar 28, 2025
Comment on lines +306 to +307
if version != 3 {
t.Fatalf("expected version 3, got %v", version)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we export the ldbVersion constant in database/tbcd/level and use that here?

@@ -82,3 +163,162 @@ func (l *ldb) v2(ctx context.Context) error {
binary.BigEndian.PutUint64(v, 2)
return l.MetadataPut(ctx, versionKey, v)
}

// v3 upgrade the database from v2 to v3.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: small typo

Suggested change
// v3 upgrade the database from v2 to v3.
// v3 upgrades the database from v2 to v3.

@github-actions github-actions bot added the area: hemictl This is a change to hemictl label Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: hemictl This is a change to hemictl area: tbc This is a change to TBC (Tiny Bitcoin) size: L This change is large (+/- <500) type: enhancement This improves existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants