Skip to content

Commit

Permalink
Add debug info to missing roots
Browse files Browse the repository at this point in the history
  • Loading branch information
gagliardetto committed Sep 25, 2023
1 parent db32960 commit 9b35c9e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pkg/blockstore/schedule.go
Original file line number Diff line number Diff line change
Expand Up @@ -477,9 +477,17 @@ func (schedule *TraversalSchedule) init(
iter.Seek(key[:])
if !iter.Valid() {
logErrorf(
"seeked to slot %d but got invalid (not found): moving down to next DB",
"seeked to slot %d but got invalid (not found, and there is no greater one either): moving down to next DB",
wanted,
)
{
_, err := handle.DB.GetSlotMeta(wanted)
if err == nil {
logInfof("even though we couldn't find the slot root, we found the meta for slot %d", wanted)
} else {
logInfof("we couldn't find the slot root, and we couldn't find the meta for slot %d either", wanted)
}
}
break slotLoop
}
gotRoot, ok := ParseSlotKey(iter.Key().Data())
Expand Down

0 comments on commit 9b35c9e

Please sign in to comment.