s3: Handle piece flushing exception
When a piece is uploaded it's first flushed, then upload-copy is issued. Both happen in the background and if piece flush calls resolves with exception the exception remains unhandled. That's OK, since upload finalization code checks that some pieces didn't complete (for whatever reason) and fails the whole uploading, however, the ignored exception is reported in logs. Not nice. Signed-off-by: Pavel Emelyanov <xemul@scylladb.com> Closes scylladb/scylladb#15491
This commit is contained in:
committed by
Botond Dénes
parent
ac8005a102
commit
e6fe18ca55
@@ -707,7 +707,10 @@ future<> client::upload_sink_base::upload_part(std::unique_ptr<upload_sink> piec
|
||||
// ... the exact exception only remains in logs
|
||||
s3l.warn("couldn't copy-upload part {}: {} (upload id {})", part_number, ex, _upload_id);
|
||||
});
|
||||
}).finally([this, &piece] {
|
||||
}).then_wrapped([this, &piece] (auto f) {
|
||||
if (f.failed()) {
|
||||
s3l.warn("couldn't flush piece {}: {} (upload id {})", piece._object_name, f.get_exception(), _upload_id);
|
||||
}
|
||||
return _client->delete_object(piece._object_name).handle_exception([&piece] (auto ex) {
|
||||
s3l.warn("failed to remove copy-upload piece {}", piece._object_name);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user