mirror of
https://source.quilibrium.com/quilibrium/ceremonyclient.git
synced 2024-11-10 18:25:17 +00:00
skip compaction missing data (#143)
This commit is contained in:
parent
286d38e054
commit
eb6e5c97e7
@ -51,7 +51,11 @@ func newNode(
|
|||||||
if err := clockStore.Compact(
|
if err := clockStore.Compact(
|
||||||
intrinsicFilter,
|
intrinsicFilter,
|
||||||
); err != nil {
|
); err != nil {
|
||||||
panic(err)
|
if errors.Is(err, store.ErrNotFound) {
|
||||||
|
logger.Error("Missing compaction data. Skipping for now.", zap.Error(err))
|
||||||
|
} else {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
logger.Info("compaction complete")
|
logger.Info("compaction complete")
|
||||||
|
|
||||||
|
@ -1277,7 +1277,7 @@ func (p *PebbleClockStore) Compact(
|
|||||||
idxValue, closer, err := p.db.Get(clockDataLatestIndex(dataFilter))
|
idxValue, closer, err := p.db.Get(clockDataLatestIndex(dataFilter))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if errors.Is(err, pebble.ErrNotFound) {
|
if errors.Is(err, pebble.ErrNotFound) {
|
||||||
return errors.Wrap(err, "compact")
|
return ErrNotFound
|
||||||
}
|
}
|
||||||
|
|
||||||
return errors.Wrap(err, "compact")
|
return errors.Wrap(err, "compact")
|
||||||
@ -1291,7 +1291,7 @@ func (p *PebbleClockStore) Compact(
|
|||||||
value, closer, err := p.db.Get(clockDataFrameKey(dataFilter, frameNumber))
|
value, closer, err := p.db.Get(clockDataFrameKey(dataFilter, frameNumber))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if errors.Is(err, pebble.ErrNotFound) {
|
if errors.Is(err, pebble.ErrNotFound) {
|
||||||
return errors.Wrap(err, "compact")
|
return ErrNotFound
|
||||||
}
|
}
|
||||||
|
|
||||||
return errors.Wrap(err, "compact")
|
return errors.Wrap(err, "compact")
|
||||||
|
Loading…
Reference in New Issue
Block a user