Per sequence uploads should resume on the offset of the first incomplete chunk.
2022-10-13 14:11:23,512 - DEBUG - Sending upload_fetch_offset via IPC: {'total_sequence_count': 2, 'sequence_idx': 0, 'file_type': 'zip', 'import_path': 'mapillary_public_uploads/mly_tools_00c8a153ca702f5b1d714bd83d0e8362.zip', 'sequence_image_count': 163, 'entity_size': 618237384, 'md5sum': 'c043f21e7f5d2f4ab25c1ba5099bf5a7', 'upload_start_time': 1665663081.9819736, 'upload_total_time': 0, 'offset': 0, 'retries': 0, 'upload_last_restart_time': 1665663083.5125833, 'upload_first_offset': 0}
2022-10-13 14:11:37,891 - DEBUG - Sending upload_progress via IPC: {'total_sequence_count': 2, 'sequence_idx': 0, 'file_type': 'zip', 'import_path': 'mapillary_public_uploads/mly_tools_00c8a153ca702f5b1d714bd83d0e8362.zip', 'sequence_image_count': 163, 'entity_size': 618237384, 'md5sum': 'c043f21e7f5d2f4ab25c1ba5099bf5a7', 'upload_start_time': 1665663081.9819736, 'upload_total_time': 0, 'offset': 3792867, 'retries': 0, 'upload_last_restart_time': 1665663083.5125833, 'upload_first_offset': 0, 'chunk_size': 3792867}
2022-10-13 14:11:53,101 - DEBUG - Sending upload_progress via IPC: {'total_sequence_count': 2, 'sequence_idx': 0, 'file_type': 'zip', 'import_path': 'mapillary_public_uploads/mly_tools_00c8a153ca702f5b1d714bd83d0e8362.zip', 'sequence_image_count': 163, 'entity_size': 618237384, 'md5sum': 'c043f21e7f5d2f4ab25c1ba5099bf5a7', 'upload_start_time': 1665663081.9819736, 'upload_total_time': 0, 'offset': 7585734, 'retries': 0, 'upload_last_restart_time': 1665663083.5125833, 'upload_first_offset': 0, 'chunk_size': 3792867}
2022-10-13 14:12:08,341 - DEBUG - Sending upload_progress via IPC: {'total_sequence_count': 2, 'sequence_idx': 0, 'file_type': 'zip', 'import_path': 'mapillary_public_uploads/mly_tools_00c8a153ca702f5b1d714bd83d0e8362.zip', 'sequence_image_count': 163, 'entity_size': 618237384, 'md5sum': 'c043f21e7f5d2f4ab25c1ba5099bf5a7', 'upload_start_time': 1665663081.9819736, 'upload_total_time': 0, 'offset': 11378601, 'retries': 0, 'upload_last_restart_time': 1665663083.5125833, 'upload_first_offset': 0, 'chunk_size': 3792867}
2022-10-13 14:12:22,579 - DEBUG - Sending upload_progress via IPC: {'total_sequence_count': 2, 'sequence_idx': 0, 'file_type': 'zip', 'import_path': 'mapillary_public_uploads/mly_tools_00c8a153ca702f5b1d714bd83d0e8362.zip', 'sequence_image_count': 163, 'entity_size': 618237384, 'md5sum': 'c043f21e7f5d2f4ab25c1ba5099bf5a7', 'upload_start_time': 1665663081.9819736, 'upload_total_time': 0, 'offset': 15171468, 'retries': 0, 'upload_last_restart_time': 1665663083.5125833, 'upload_first_offset': 0, 'chunk_size': 3792867}
2022-10-13 14:12:25,712 - WARNING - Error uploading chunk_size 3792867 at offset 0: HTTPError: 412 Client Error: Precondition Failed for url: https://rupload.facebook.com/mapillary_public_uploads/mly_tools_c043f21e7f5d2f4ab25c1ba5099bf5a7.zip
2022-10-13 14:12:25,712 - INFO - Retrying in 2 seconds (1/200)
2022-10-13 14:12:28,367 - DEBUG - Sending upload_fetch_offset via IPC: {'total_sequence_count': 2, 'sequence_idx': 0, 'file_type': 'zip', 'import_path': 'mapillary_public_uploads/mly_tools_00c8a153ca702f5b1d714bd83d0e8362.zip', 'sequence_image_count': 163, 'entity_size': 618237384, 'md5sum': 'c043f21e7f5d2f4ab25c1ba5099bf5a7', 'upload_start_time': 1665663081.9819736, 'upload_total_time': 62.19941592216492, 'offset': 0, 'retries': 1, 'upload_first_offset': 0, 'chunk_size': 3792867, 'upload_last_restart_time': 1665663148.3675609}
All of the above means that it is currently extremely difficult to upload large sequences on low bandwidth connections because as soon as the load on the server changes (which is very likely on long uploads), the chunk size changes and the client has to restart uploading from offset 0. This is a huge waste of resources!
Basic information
0.9.5Linux, probablyanyanySteps to reproduce behavior
Ctrl+Cand then resuming (while the upload session is still alive on the server) with exactly the same command should have the same effect.'offset': 0.It is
unclearwhetherthis is aclient orserver bug. My gut feeling tells me that it is a server bugbut I may be wrong. The server may change the chunk size during upload depending on load. The client should adapt to this. The server should also always respond with the correct offset, independent of the current chunk size.Expected behavior
Per sequence uploads should resume on the offset of the first incomplete chunk.
Actual behavior
Note that
'offset': 0, while it should have been'offset': 15171468because this is the offset of the first incomplete chunk.All of the above means that it is currently extremely difficult to upload large sequences on low bandwidth connections because as soon as the load on the server changes (which is very likely on long uploads), the chunk size changes and the client has to restart uploading from offset 0. This is a huge waste of resources!