From 14911bfdff3b94a667a671c436eb4dbae2a34a04 Mon Sep 17 00:00:00 2001 From: Seebs Date: Tue, 23 Nov 2021 10:00:08 -0600 Subject: [PATCH] Perform sanity check only if we have the storage it runs on SanityCheckMapping is specific to roaring bitmaps stored in-memory, if we have an RBF backend, we shouldn't even try it, it'll just panic. This implies that, in whatever circumstance we were hitting this, we were getting an error back from the backend. We still need to address that error, but to do that we need to know what it was, which we don't if we panic. --- fragment.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fragment.go b/fragment.go index 674f2da65..ad9283551 100644 --- a/fragment.go +++ b/fragment.go @@ -2485,7 +2485,7 @@ func (f *fragment) importPositions(tx Tx, set, clear []uint64, rowSet map[uint64 err = doFunc() } - if err != nil { + if err != nil && f.storage != nil { // we got an error. it's possible that the error indicates that something went wrong. mappedIn, mappedOut, unmappedIn, errs, e2 := f.storage.SanityCheckMapping(f.currdata.from, f.currdata.to) if errs != 0 {