mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 19:50:36 +00:00
no_panic_be_happy (#1586)
This commit is contained in:
parent
91e4126ca7
commit
4c82b15c36
@ -356,7 +356,7 @@ func (db *LmdbKV) CollectMetrics() {
|
|||||||
tableGcEntries.Update(int64(stat.Entries))
|
tableGcEntries.Update(int64(stat.Entries))
|
||||||
return nil
|
return nil
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
panic(err)
|
log.Error("collecting metrics failed", "err", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -344,7 +344,7 @@ func (db *MdbxKV) CollectMetrics() {
|
|||||||
tableGcEntries.Update(int64(stat.Entries))
|
tableGcEntries.Update(int64(stat.Entries))
|
||||||
return nil
|
return nil
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
panic(err)
|
log.Error("collecting metrics failed", "err", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -347,7 +347,7 @@ func (db *ObjectDatabase) NewBatch() DbWithPendingMutations {
|
|||||||
func (db *ObjectDatabase) Begin(ctx context.Context, flags TxFlags) (DbWithPendingMutations, error) {
|
func (db *ObjectDatabase) Begin(ctx context.Context, flags TxFlags) (DbWithPendingMutations, error) {
|
||||||
batch := &TxDb{db: db}
|
batch := &TxDb{db: db}
|
||||||
if err := batch.begin(ctx, flags); err != nil {
|
if err := batch.begin(ctx, flags); err != nil {
|
||||||
panic(err)
|
return batch, err
|
||||||
}
|
}
|
||||||
return batch, nil
|
return batch, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user