From a69f9cfc6ba6ff332d1e2d8303020d49443ca8cb Mon Sep 17 00:00:00 2001 From: Julio Capote Date: Sun, 1 Jan 2023 19:38:31 -0500 Subject: working dedup --- main.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'main.go') diff --git a/main.go b/main.go index 35b5b80..e65a600 100644 --- a/main.go +++ b/main.go @@ -39,6 +39,14 @@ func main() { } defer db.Close() + log.With("type", "db").Debug("Running GC") + err = db.RunValueLogGC(0.5) + if err == badger.ErrNoRewrite { + log.With("type", "db").Debug("Nothing to GC") + } else { + log.Fatal(err) + } + // Persister persister := models.NewPersister(log, db) -- cgit v1.2.3