Skip to content
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

fix(docstore/awsdynamodb): ensure Next returns EOF when no more items #3406

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions docstore/awsdynamodb/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,10 @@
}
it.curr = 0
}
// If there are no more items, return EOF.
if len(it.items) == 0 {
return io.EOF

Check warning on line 494 in docstore/awsdynamodb/query.go

View check run for this annotation

Codecov / codecov/patch

docstore/awsdynamodb/query.go#L494

Added line #L494 was not covered by tests
}
if err := decodeDoc(&dyn.AttributeValue{M: it.items[it.curr]}, doc); err != nil {
return err
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.