-
Notifications
You must be signed in to change notification settings - Fork 479
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/keyspan: document InterleavingIter error invariants
In #3021 (33a77e1) we fixed the InterleavingIter's error handling to propagate all errors encountered by child iterators. This commit documents the invariants more thoroughly. Additionally the behavior of nextPos|prevPos is adjusted to set posExhausted if on i.err != nil on entry. This fixes a remaining latent bug when changing directions, resulting in two steps. Previously, if both steps were on the same iterator and the first step errored but the second did not, the error could go unnoticed. Future work will unit test these cases explicitly using new error-injection testing facilities.
- Loading branch information
Showing
1 changed file
with
64 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters