diff --git a/torrent/loader/db.go b/torrent/loader/db.go index 4d21db8..a2235df 100644 --- a/torrent/loader/db.go +++ b/torrent/loader/db.go @@ -19,7 +19,12 @@ type DB struct { func NewDB(path string) (*DB, error) { l := log.Logger.With().Str("component", "torrent-store").Logger() - db, err := badger.Open(badger.DefaultOptions(path).WithLogger(&dlog.Badger{L: l})) + + opts := badger.DefaultOptions(path). + WithLogger(&dlog.Badger{L: l}). + WithValueLogFileSize(1<<26 - 1) + + db, err := badger.Open(opts) if err != nil { return nil, err } diff --git a/torrent/store.go b/torrent/store.go index 70f5aba..9f8058b 100644 --- a/torrent/store.go +++ b/torrent/store.go @@ -20,7 +20,12 @@ type FileItemStore struct { func NewFileItemStore(path string, itemsTTL time.Duration) (*FileItemStore, error) { l := log.Logger.With().Str("component", "item-store").Logger() - db, err := badger.Open(badger.DefaultOptions(path).WithLogger(&dlog.Badger{L: l})) + + opts := badger.DefaultOptions(path). + WithLogger(&dlog.Badger{L: l}). + WithValueLogFileSize(1<<26 - 1) + + db, err := badger.Open(opts) if err != nil { return nil, err }