Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
storage: close pebble iter gracefully when NewPebbleSSTIterator fails
Currently, if `pebble.NewExternalIter` sets pebbleIterator.inuse to True, but then fails, the subsequent `pebbleIterator.destroy()` will panic unecessarily, since the caller of `pebble.NewExternalIter` is not actually using the iter. This bug causes TestBackupRestoreChecksum to flake in cockroachdb#83984. To fix, this patch uses pebble.Close() to gracefully close the pebbleIterator if `pebble.NewExternalIter` fails. Release Note: None
- Loading branch information