storj/uplink
Ivan Fraixedes c193dee9ae
uplink/storage/streams: Fix upload error clean up (#3555)
The number of the last segment uploaded returned by upload wasn't
correct in all the return statements. The Put method calls upload but
with the returned values wasn't even certain of cleaning up correctly
the segments uploaded when an error happens.

This commit moves the logic of cleaning up inside of the upload method
because it's easier to understand than only doing inside of it the clean
up when a context cancellation happens. It also fixes the number of
segments to be deleted by cancelHandler when an error happens.

These changes should avoid trying to delete segments which haven't been
uploaded because of the wrong index value or because of being inline.
2019-11-15 10:37:20 +01:00
..
ecclient private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
eestream private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
metainfo private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
piecestore private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
storage uplink/storage/streams: Fix upload error clean up (#3555) 2019-11-15 10:37:20 +01:00
stream lib/uplink: remove Seek method (#2768) 2019-08-13 20:29:02 +03:00
config.go private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00