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
When streaming data from unbound source (e.g. from stdin), it is possible (on a rare occasion) to perform a retry on a IOWrapper that was already released.
Currently the logic is as follows:
a chunk of data is read from the stream;
this chunk is wrapped into all the abstractions needed up to WriteIntent;
it is ensured that at most N chunks are present at once;
once read on a chunk goes to the end of the buffer, it's marked for removal – memory is reclaimed and new chunk can be downloaded.
This last point is problematic. If, during upload, the error happens after the very last write operation (the one that read last bytes from the write intent), a chunk is removed, and yet a retry is issued. Whenever a retry happens on an earlier read operation, there is no problem as the chunk is not marked for reclamation – only the very last read call is problematic.
The main problem is ensuring that no more than N buffers of data reside in memory at any given time while also ensuring that whenever a retry is issued, we have data to perform it with.
The text was updated successfully, but these errors were encountered:
When streaming data from unbound source (e.g. from
stdin
), it is possible (on a rare occasion) to perform a retry on aIOWrapper
that was already released.Currently the logic is as follows:
WriteIntent
;read
on a chunk goes to the end of the buffer, it's marked for removal – memory is reclaimed and new chunk can be downloaded.This last point is problematic. If, during upload, the error happens after the very last write operation (the one that
read
last bytes from the write intent), a chunk is removed, and yet a retry is issued. Whenever a retry happens on an earlierread
operation, there is no problem as the chunk is not marked for reclamation – only the very lastread
call is problematic.The main problem is ensuring that no more than N buffers of data reside in memory at any given time while also ensuring that whenever a retry is issued, we have data to perform it with.
The text was updated successfully, but these errors were encountered: