You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This fixes a rare read corruption that may manifest with multiple different error
messages. One example:
`[TileDB::Buffer] Error: Read failed; Trying to read beyond buffer size`
The issue is that the `Aws::IOStream` constructor that we use within the callback
set in `GetObjectRequest::SetResponseStreamFactory()` accepts a pointer to a
`boost::interprocess::bufferbuf`. We currently allocate one of these `bufferbuf`
instances on the heap and free it when we return from `S3::read`. Experimentally,
I have determined that this can cause a corruption to the buffer we stream into.
We are not responsible for what the AWS SDK does with objects created from the
callback we assigned in `GetObjectRequest::SetResponseStreamFactory()`. This
patch introduces a small wrapper so that the `Aws::IOStream` manages the lifetime
of the `boost::interprocess::bufferbuf`.
I also noticed that we use an SDK version with a `Aws::Utils::Stream::PreallocatedStreamBuf`
that we can use instead of the boost `bufferbuf`.
Relevant discussion on stack overflow:
aws/aws-sdk-cpp#1430
---
TYPE: BUG
DESC: Fix rare read corruption in S3
Co-authored-by: Joe Maley <[email protected]>
0 commit comments