diff --git a/ethdb/kv_lmdb.go b/ethdb/kv_lmdb.go index d27847d95..a5c9c477f 100644 --- a/ethdb/kv_lmdb.go +++ b/ethdb/kv_lmdb.go @@ -356,7 +356,7 @@ func (db *LmdbKV) CollectMetrics() { tableGcEntries.Update(int64(stat.Entries)) return nil }); err != nil { - panic(err) + log.Error("collecting metrics failed", "err", err) } } diff --git a/ethdb/kv_mdbx.go b/ethdb/kv_mdbx.go index c65e096f7..73ef758b0 100644 --- a/ethdb/kv_mdbx.go +++ b/ethdb/kv_mdbx.go @@ -344,7 +344,7 @@ func (db *MdbxKV) CollectMetrics() { tableGcEntries.Update(int64(stat.Entries)) return nil }); err != nil { - panic(err) + log.Error("collecting metrics failed", "err", err) } } diff --git a/ethdb/object_db.go b/ethdb/object_db.go index e60e85bd5..9ecf7e2e6 100644 --- a/ethdb/object_db.go +++ b/ethdb/object_db.go @@ -347,7 +347,7 @@ func (db *ObjectDatabase) NewBatch() DbWithPendingMutations { func (db *ObjectDatabase) Begin(ctx context.Context, flags TxFlags) (DbWithPendingMutations, error) { batch := &TxDb{db: db} if err := batch.begin(ctx, flags); err != nil { - panic(err) + return batch, err } return batch, nil }