Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/keyspan: fix InterleavingIter error handling
Previously, the InterleavingIter could violate the InternalIterator contract when an error is encountered. If one of its two child iterators encountered an error and returned a nil KV pair, the iterator could yield a non-nil KV to the caller. This commit updates the interleaving iterator error handling to accumulate any encountered errors on a field and always yield nil. This bug was surfaced by a new 'invariants' tag assertion in Valid, asserting that Error() returns nil if the iterator is valid. With this invariants tag, existing tests surface the assertion failure. Additional test coverage will come with #1115.
- Loading branch information