ostafen / clover

A lightweight document-oriented NoSQL database written in pure Golang.
MIT License
633 stars 54 forks source link

Badger storage | RunValueLogGC() is managed with a fatal error #145

Open pricelessrabbit opened 5 months ago

pricelessrabbit commented 5 months ago

Hi all :) trying out the last version of the v2 branch and i got this error. The real issue is that inside clover storage, it's managed with a Fatal error.

  case <-ticker.C:
  err := store.db.RunValueLogGC(GCDiscardRatio)
  if err != nil && errors.Is(err, badger.ErrNoRewrite) {
      log.Fatalf("RunValueLogGC(): %s\n", err.Error())
  }
  }

So as a result, my application exits every 5 mins with no way to recover from errors. Is there a way to fix it? should i opening a PR with to allow for a non-fatal error log?

I also add a comment to the original issue about it.

ostafen commented 5 months ago

Yes, open a PR, please