storj/cmd/uplink/ulfs
Andrew Harding 5efb08cd7b cmd/uplink: skip abort on committed multipart writes
The copyFile method has some safeguards to ensure that the multipart
write is aborted. This is accomplished by always calling abort on the
MultiWriteHandle when the copy is finished, whether or not there was a
failure or it was successfully committed. If the copy was committed,
then this RPC is a no-op on the metainfo server.

Regardless, the calls to abort to constitute an additional RPC to the
satellite for no benefit. This is exacerbated by the fact that the code
currently ends up calling abort twice.

This change updates the libuplink-backed MultiWriteHandle implementation
to not call abort if the write is committed and vice-versa. This
eliminates the two wasteful RPC calls.

Change-Id: I13679234f6f473e9a93179e6791fb57eac512f25
2023-01-05 18:30:23 +00:00
..
buffer_test.go cmd/uplink: add buffering while writing to stdout 2022-06-09 15:10:04 +00:00
buffer.go cmd/uplink: add buffering while writing to stdout 2022-06-09 15:10:04 +00:00
filesystem.go go.mod: bump clingy dependency 2022-08-31 10:24:27 +00:00
handle_file.go cmd/uplink: fix recursive copy and improve tests 2022-05-11 15:17:16 -04:00
handle_generic.go cmd/uplink: adding Length Method to MultiReadHandle 2022-05-13 21:31:45 +02:00
handle_std_test.go cmd/uplink/ulfs: disallow writes after first failure 2022-04-25 18:16:46 +03:00
handle_std.go cmd/uplink: adding Length Method to MultiReadHandle 2022-05-13 21:31:45 +02:00
handle_uplink.go cmd/uplink: skip abort on committed multipart writes 2023-01-05 18:30:23 +00:00
helpers_iterator.go cmd/uplinkng: become cmd/uplink 2022-02-09 17:02:21 +00:00
local_backend_mem.go cmd/uplink: fix recursive copy and improve tests 2022-05-11 15:17:16 -04:00
local_backend_os.go cmd/uplink: fix recursive copy and improve tests 2022-05-11 15:17:16 -04:00
local.go cmd/uplink: fix recursive copy and improve tests 2022-05-11 15:17:16 -04:00
mixed.go go.mod: bump clingy dependency 2022-08-31 10:24:27 +00:00
remote.go cmd/uplink: bring back --metadata for cp command 2022-05-18 15:58:53 +00:00