zio-aws
zio-aws copied to clipboard
Race condition with S3 PutObject upload stream with Netty client
It fails with Data read has a different checksum than expected
, but it can randomly pass if pausing it with a debugger for example.
My investigation shows that the stream gets drained and bytes sent to the Netty channel, still in the checksum validator the response metadata (from localstack) contains a different checksum and the content length is reported as 0.
There is a test case in the integtests
subproject to reproduce it.
NOTE: if content length is known and it's set on the request object, it works correctly.