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 nil pointer dereference on AWS errors #148

Merged
merged 2 commits into from
Jun 6, 2024

Conversation

jwhitaker-swiftnav
Copy link
Contributor

@jwhitaker-swiftnav jwhitaker-swiftnav commented Oct 30, 2022

Hey, currently certain AWS errors cause a segfault instead of returning the err :(

For example, if your stream gets recreated outside of your app, your stored sharditerator is no longer valid and you'll get an AWS error when you try to use it.

EDIT: I've also changed listShards error handling - because we no longer panic, the "loop forever even if you error" behaviour of listShards is now quite problematic. I think it should return error - if client wants to loop and try again forever they are free to do so.

Jarrad Whitaker added 2 commits October 31, 2022 12:52
before the previous commit e465b09, client errors panicked the
reader, so consumers would pick up sharditerator errors by virtue of
their server crashing and burning.

Now that client errors are properly returned, the behaviour of
listShards is problematic because it absorbs any client errors it gets.

The result of these two things now is that if you hit an aws error, your server will go into an
endless scan loop you can't detect and can't easily recover from.

To avoid that, listShards will now stop if it hits a client error.
@harlow
Copy link
Owner

harlow commented Jun 6, 2024

Makes sense, thanks for PR!

@harlow harlow merged commit 553e239 into harlow:master Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants