This change addresses a TODO to fix double closing of the
fragmentBlockIter. We can now use a sync.Pool and we can remove the
wrapper type that used a sync pool only for range key iterators.
We add an invariants.DoubleCloseCheck type which checks for multiple
close calls in invariant builds. In these builds we sometimes don't
put objects back in the pool, so that this check can run.
We now always call fragmentBlockIter.init() (we were missing on a
minor optimization before).
This change addresses a TODO to fix double closing of the
fragmentBlockIter
. We can now use a sync.Pool and we can remove the wrapper type that used a sync pool only for range key iterators.We add an
invariants.DoubleCloseCheck
type which checks for multiple close calls in invariant builds. In these builds we sometimes don't put objects back in the pool, so that this check can run.We now always call
fragmentBlockIter.init()
(we were missing on a minor optimization before).