From fe4badac477d9498f6d715d1cc58c52cb7db89b4 Mon Sep 17 00:00:00 2001 From: Mattia Barbisan Date: Wed, 31 Jan 2024 20:35:05 +0100 Subject: [PATCH] changed log Fatalf to Printf in badger GC routine to avoid exiting application when ErrNoRewrite occurs --- 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()) } } }