From e6a58d6d36bf5889f79bd9c655ba8d69c509feb0 Mon Sep 17 00:00:00 2001 From: pricelessrabbit Date: Wed, 31 Jan 2024 21:24:29 +0100 Subject: [PATCH] changed log Fatalf to Printf in badger GC routine to avoid exiting application when ErrNoRewrite occurs (#146) Co-authored-by: Mattia Barbisan --- store/badger/badger.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/store/badger/badger.go b/store/badger/badger.go index 78a4774..97c1475 100644 --- a/store/badger/badger.go +++ b/store/badger/badger.go @@ -139,7 +139,7 @@ func (store *badgerStore) startGC() { case <-ticker.C: err := store.db.RunValueLogGC(GCDiscardRatio) if err != nil && errors.Is(err, badger.ErrNoRewrite) { - log.Fatalf("RunValueLogGC(): %s\n", err.Error()) + log.Printf("RunValueLogGC(): %s\n", err.Error()) } } }