Skip to content

Conversation

@harshavardhana
Copy link
Member

Since we do not have resuming support, we should
simply cleanup failed transfers.

minio/api.py Outdated
part_data = read_full(data, current_part_size)
# Append current part information
parts_to_upload.append((bucket_name, object_name, upload_id, part_number, part_data))
parts_to_upload.append((bucket_name, object_name, upload_id,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this just a formatting change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep!

Copy link
Collaborator

@kannappanr kannappanr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

minio/api.py Outdated
part_number, part_data))

# Run parts upload in parallel
pool.parallel_run(self._upload_part_routine, parts_to_upload)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pool.parallel_run() can raise an exception, I think it would be good to catch it, remove incomplete upload and throw the exception again.

try:
     pool.parallel_run(self._upload_part_routine, parts_to_upload)
except:
     self._remove_incomplete_upload(bucket_name,
                                           object_name,
                                           upload_id)
     raise

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@harshavardhana harshavardhana force-pushed the pool branch 2 times, most recently from 67e2c50 to 1255abe Compare December 7, 2017 23:03
self._remove_incomplete_upload(bucket_name,
object_name,
upload_id)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A missing raise here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Since we do not have resuming support, we should
simply cleanup failed transfers.
Copy link
Member

@vadmeste vadmeste left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

upload_id,
uploaded_parts,
metadata=metadata)
try:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there is formatting issue here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you think?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't see any issue, if there is a formatting issue python won't really compile.

@deekoder deekoder merged commit f1130fd into minio:master Dec 8, 2017
@harshavardhana harshavardhana deleted the pool branch December 8, 2017 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants