Skip to content

Cap upload stream reads to remaining file bytes - #833

Open
rnissl wants to merge 2 commits into
mapillary:mainfrom
rnissl:mly/01-upload-read-cap
Open

rnissl wants to merge 2 commits into
mapillary:mainfrom
rnissl:mly/01-upload-read-cap

Conversation

@rnissl

@rnissl rnissl commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Cap FileIO.read to the remaining file size so a large chunk size cannot allocate a 1 GiB buffer per JPEG worker.

Test plan

  • tests/unit/test_upload_api_v4.py (includes test_chunkize_caps_read_to_remaining_bytes)

Rebased onto current mapillary/mapillary_tools main (d1b82ab). Independent of the GoPro Max / custom FFmpeg stack.

A huge chunk size used to make FileIO allocate the full buffer and OOM with many JPEG workers.

Co-authored-by: Cursor <cursoragent@cursor.com>
@meta-cla meta-cla Bot added the cla signed label Sep 20, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant