Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Upgrade to badger V3 #61

Closed
wants to merge 13 commits into from
Closed

Conversation

koko1123
Copy link

@koko1123 koko1123 commented Jan 12, 2023

Goal of this PR

Switch badger to V3 from https://github.com/outcaste-io/badger/tags

  • tests pass

@koko1123 koko1123 changed the title Upgrade to badger V4 Upgrade to badger V3 Jan 17, 2023
@@ -21,7 +21,7 @@ import (

"golang.org/x/sync/errgroup"

"github.com/dgraph-io/badger/v2"
"github.com/dgraph-io/badger/v3"
Copy link

Choose a reason for hiding this comment

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

This is the one we're looking for 🔥

"badger_v2_lsm_level_gets_total": prometheus.NewDesc("archive_badger_lsm_level_gets_total", "number of LSM gets", []string{"level"}, nil),
"badger_v2_lsm_size_bytes": prometheus.NewDesc("archive_badger_lsm_size_bytes", "size of the LSM in bytes", []string{"path"}, nil),
"badger_v2_vlog_size_bytes": prometheus.NewDesc("archive_badger_vlog_size_bytes", "size of the value log in bytes", []string{"path"}, nil),
"badger_v4_disk_reads_total": prometheus.NewDesc("archive_badger_disk_reads_total", "cumulative number of reads", nil, nil),

Choose a reason for hiding this comment

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

nit: v3

@SaveTheRbtz
Copy link

Before committing to master you may want to try deploying the package from this branch to verify that this fixes resource consumption issue

Comment on lines -25 to -37
WithMaxTableSize(256 << 20).
WithValueLogFileSize(64 << 20).
WithTableLoadingMode(options.FileIO).
WithValueLogLoadingMode(options.FileIO).
WithNumMemtables(1).
WithKeepL0InMemory(false).
WithCompactL0OnClose(false).
WithNumLevelZeroTables(1).
WithNumLevelZeroTablesStall(2).
WithLoadBloomsOnOpen(false).
WithIndexCacheSize(2000 << 20).
WithBlockCacheSize(0).
WithLogger(nil)

Choose a reason for hiding this comment

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

do you still need these changes or were they related to things cut in v4?

@koko1123
Copy link
Author

parallel effort from @SaveTheRbtz closing.

@koko1123 koko1123 closed this Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants