mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-05 09:14:28 +00:00
Update blob pruning log (#13417)
This commit is contained in:
parent
d439e6da74
commit
3c1c0b3c00
@ -239,8 +239,6 @@ func (p blobNamer) path() string {
|
|||||||
func (bs *BlobStorage) Prune(pruneBefore primitives.Slot) error {
|
func (bs *BlobStorage) Prune(pruneBefore primitives.Slot) error {
|
||||||
t := time.Now()
|
t := time.Now()
|
||||||
|
|
||||||
log.Debug("Pruning old blobs")
|
|
||||||
|
|
||||||
var dirs []string
|
var dirs []string
|
||||||
err := afero.Walk(bs.fs, ".", func(path string, info os.FileInfo, err error) error {
|
err := afero.Walk(bs.fs, ".", func(path string, info os.FileInfo, err error) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -266,12 +264,14 @@ func (bs *BlobStorage) Prune(pruneBefore primitives.Slot) error {
|
|||||||
totalPruned += num
|
totalPruned += num
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if totalPruned > 0 {
|
||||||
pruneTime := time.Since(t)
|
pruneTime := time.Since(t)
|
||||||
log.WithFields(log.Fields{
|
log.WithFields(log.Fields{
|
||||||
"lastPrunedEpoch": slots.ToEpoch(pruneBefore),
|
"lastPrunedEpoch": slots.ToEpoch(pruneBefore),
|
||||||
"pruneTime": pruneTime,
|
"pruneTime": pruneTime,
|
||||||
"numberBlobsPruned": totalPruned,
|
"numberBlobsPruned": totalPruned,
|
||||||
}).Debug("Pruned old blobs")
|
}).Debug("Pruned old blobs")
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user