storj/uplink/storage/streams
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
..
eof.go rename all the things (#2531) 2019-07-28 08:55:36 +03:00
path.go rename all the things (#2531) 2019-07-28 08:55:36 +03:00
shim.go storage/: remove reverse-key-listing feature 2019-11-12 18:47:51 +00:00
size.go rename all the things (#2531) 2019-07-28 08:55:36 +03:00
store_test.go private: rename internal to private (#3573) 2019-11-14 21:46:15 +02:00
store.go uplink/storage/streams: Fix upload error clean up (#3555) 2019-11-15 10:37:20 +01:00