Refactor object storage multipart upload interface to distinguish close, complete and abort operations

This commit is contained in:
obdev
2024-02-02 12:12:33 +00:00
committed by ob-robot
parent 9ddb3fb67b
commit 6c8cde0b84
28 changed files with 506 additions and 144 deletions

View File

@ -5559,7 +5559,16 @@ int ObLSBackupComplementLogTask::transfer_clog_file_(const ObBackupPath &src_pat
break;
}
}
if (OB_SUCC(ret)) {
if (OB_FAIL(device_handle->complete(fd))) {
LOG_WARN("fail to complete multipart upload", K(ret), K(device_handle), K(fd));
}
} else {
if (OB_TMP_FAIL(device_handle->abort(fd))) {
ret = COVER_SUCC(tmp_ret);
LOG_WARN("fail to abort multipart upload", K(ret), K(tmp_ret), K(device_handle), K(fd));
}
}
if (OB_SUCCESS != (tmp_ret = util.close_device_and_fd(device_handle, fd))) {
LOG_WARN("fail to close file", K(ret), K_(backup_dest), K(dst_path));
ret = OB_SUCCESS == ret ? tmp_ret : ret;