Open briancsimonsen opened 5 years ago
I think this is a bug in B2 CLI. The _find_unfinished_file_if_possible
function assumes that the number of parts on B2 is at most equal to the number of parts for the local file. If there are more parts on B2 it will probably fail with this error you are seeing (haven't reproduced it).
Did you change the part size during your sync or did the file size of the corresponding files change? Until this bug is resolved you can delete the unfinished file from B2 and try syncing again.
The files are all for archival purposes so none of the files should be edited in any way. However, the upload was originally attempted using Cyberduck but the speed was so slow that I switched to the CLI. I don't think that would be the cause considering the command I am running uses the default filename and modification time compare so all partially uploaded files would be skipped.
If Cyberduck used a different part size than CLI, then it could be a problem.
In order to complete the sync, you could cancel the large file uploads (easy, via b2 cancel-all-unfinished-large-files <bucketName>
or b2 list-unfinished-large-files <bucketName>
and b2 cancel-large-file <fileId>
) or try to match the part size with whatever cyberduck chose (hard).
@ppolewicz was correct. There were quite a few unfinished files. After running the b2 cancel-all-unfinished-large-files <bucketName>
command everything started working as expected and uploaded successfully.
We should provide a useful error message instead of the current behavior, but I don't think we should implement a mechanism to detect the part size of the interrupted large file upload. It is possible, but it would never get used and the workaround is trivial, so we just need to tell the user what it is.
Why an error message? If there are more parts on B2 than local parts, the unfinished file is not a match and we continue similar to when the file info is different.
Fair point
If unfinished files require system resources, treating unfinished files as unique and ignoring them might not be a good idea.
The error occurs while trying to sync a large number of files (~139000) for upload. The process worked correctly on default settings up until nearly the end where the following error occurred. This sync has never successfully completed and is going to a new bucket on a new account.
This is a copy paste from the last try but I have tried a few different things to get around this error.