-
Notifications
You must be signed in to change notification settings - Fork 645
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
S3Client.download fails silently on 404 #1117
Comments
Interesting. The Future is flatmapped with |
@2m , thanks for the quick reply. |
@eyalfa I've seen more silent failures with the alpakka-s3 connector. When the processing is slow, and the s3 connector is back-pressured, it causes the source to hang irrecoverably. The connector wont throw an exception and wont emit any more data downstream. Eventually this causes the entire application to hang, as it cannot make any progress, and wont fail so it can be restarted. |
@lexn82 , can u reproduce this behavior in a test? |
Fixed in #1122 |
when attempting to download a missing key from s3, the returned
ObjectMetaData
future completes successfully and the returned Source completes without emitting any data.I suspect the root cause is in
akka.stream.alpakka.s3.impl.S3Stream#download
:as you can see the initial future is an
HttpResponse
future, in this case it has a 404 status, it's first being flatMapped to create the source and later mapped to created the metadata object.the flatMap internally checks the response status while map fails to do so.
in my use-case I pass this source to play's
Ok.sendEntity
(play.api.mvc.Results.Status#sendEntity
) so I don't control on the way it is being consumed and how are failures handled, I'd prefer being signaled about the missing key (via a failure or 'Option[ObjectMetadata]') so my program can behave accordingly.The text was updated successfully, but these errors were encountered: