mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
swarm/storage: Add progress debug logline
This commit is contained in:
parent
26f6a509c7
commit
10bd9583a9
1 changed files with 8 additions and 1 deletions
|
|
@ -607,13 +607,18 @@ func (s *LDBStore) CleanGCIndex() error {
|
||||||
var poPtrs [256]uint64
|
var poPtrs [256]uint64
|
||||||
var doneIterating bool
|
var doneIterating bool
|
||||||
lastIdxKey := []byte{keyIndex}
|
lastIdxKey := []byte{keyIndex}
|
||||||
|
var cleanBatchCount int
|
||||||
for !doneIterating {
|
for !doneIterating {
|
||||||
|
|
||||||
|
cleanBatchCount++
|
||||||
var idxs []dpaDBIndex
|
var idxs []dpaDBIndex
|
||||||
var chunkHashes [][]byte
|
var chunkHashes [][]byte
|
||||||
var pos []uint8
|
var pos []uint8
|
||||||
it := s.db.NewIterator()
|
it := s.db.NewIterator()
|
||||||
it.Seek(lastIdxKey)
|
it.Seek(lastIdxKey)
|
||||||
for i := 0; i < 4096; i++ {
|
|
||||||
|
var i int
|
||||||
|
for i = 0; i < 4096; i++ {
|
||||||
if !it.Valid() {
|
if !it.Valid() {
|
||||||
doneIterating = true
|
doneIterating = true
|
||||||
break
|
break
|
||||||
|
|
@ -667,6 +672,8 @@ func (s *LDBStore) CleanGCIndex() error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.Debug("clean gc index pass", "batch", cleanBatchCount, "checked", i, "kept", len(idxs))
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Debug("gc cleanup entries", "ok", okEntryCount, "total", totalEntryCount, "batchlen", batch.Len())
|
log.Debug("gc cleanup entries", "ok", okEntryCount, "total", totalEntryCount, "batchlen", batch.Len())
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue