From 9b35c9e9bde497c78847e83ad6c3421355a1cbe2 Mon Sep 17 00:00:00 2001 From: gagliardetto Date: Mon, 25 Sep 2023 12:26:36 +0200 Subject: [PATCH] Add debug info to missing roots --- pkg/blockstore/schedule.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkg/blockstore/schedule.go b/pkg/blockstore/schedule.go index 47b1ee6..0573c61 100644 --- a/pkg/blockstore/schedule.go +++ b/pkg/blockstore/schedule.go @@ -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())