knox-mpu icon indicating copy to clipboard operation
knox-mpu copied to clipboard

Completes before parts are finished uploading

Open bryancusatis opened this issue 10 years ago • 1 comments

I'm having trouble tracking down an issue. I'm trying to upload a 7020205724 byte file with each part size set to 20971520 bytes. This results in 335 parts needing to be uploaded.

The issue is that it seems to get lose track of unfinished uploads and pushes the completion xml to S3 before all parts are there. This results in a corrupted file.

I'm logging the completion and finish events to a file for debug purposes and end up with something like this (notice that it thinks there are only 328 parts in the finished upload).

Finished uploading file with ETag "84403d6a7224f82f49a1b3a0731b612d-328" Finished uploading part 329 with ETag "aaec8a124b4699bd74293ba91bca886d". Finished uploading part 335 with ETag "92d99d83507e880cdd1d65fd29e3874b". Finished uploading part 330 with ETag "c3d5efe9d6732a1aaa58235921734977". Finished uploading part 331 with ETag "7477b87c1b48f5cb8a7fead3148a5b61". Finished uploading part 333 with ETag "08e759f7e6319bd7a29395cff5094401". Finished uploading part 334 with ETag "611a4c95827d795a09ebee185a879d10". Finished uploading part 332 with ETag "3dd6a210a0f5a8fc70d9b13d5656c2bb".

Any thoughts? I've been looking through the code and can't quite pinpoint what is happening.

bryancusatis avatar May 20 '14 17:05 bryancusatis

Definitely something weird happening and it is either due to retry or batching logic.

So it is still not detecting that uploads are in progress before .end reaches its callback, so that is weird but it might be because those ones are from previous errors.

Even more weird now is that when it errors the previous calls seem to keep going:

Failed: {"part":166,"message":"Upload failed with status code 400"} Starting uploading part 166. Failed: {"part":166,"message":{"code":"ECONNRESET","errno":"ECONNRESET","syscall":"write"}} Starting uploading part 166. Failed: {"part":166,"message":{"code":"ECONNRESET","errno":"ECONNRESET","syscall":"write"}} Starting uploading part 166. Finished uploading part 166 with ETag "31dbb9efd69f00be48918fc4e5afc935". Finished uploading part 166 with ETag "31dbb9efd69f00be48918fc4e5afc935". Finished uploading part 166 with ETag "31dbb9efd69f00be48918fc4e5afc935".

I'm not sure how that is happening. I figured the previous request object would just stop.

bryancusatis avatar May 21 '14 14:05 bryancusatis