-
Notifications
You must be signed in to change notification settings - Fork 11
returns snapshot incomplete error when snapshot is interrupted #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…s into dylan/snapshot-iterator
| // Teardown attempts to gracefully teardown the iterator. | ||
| func (s *SnapshotIterator) Teardown(ctx context.Context) error { | ||
| s.rows.Close() | ||
| if commitErr := s.tx.Commit(ctx); commitErr != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be a dumb question, but why do we call s.tx.Commit() here at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simply to end the transaction.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I think I need a break.:D I was thinking this is the source teardown, but it's the iterator teardown, and actually a different thing in mind because of that.
27ba7c9 to
b544e42
Compare
lovromazgon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙌
Description
Returns an
ErrSnapshotInterruptwhen a snapshot is stopped before it's finished.Creates the
ErrSnapshotCompletevariable in anticipation of creating theCombinedIteratorAddresses #22 (comment)
Quick checks: