Skip to content

Stream tarball downloads and file uploads to avoid memory buffering#73

Merged
ericmj merged 2 commits intomainfrom
ericmj/stream-downloads
Mar 9, 2026
Merged

Stream tarball downloads and file uploads to avoid memory buffering#73
ericmj merged 2 commits intomainfrom
ericmj/stream-downloads

Conversation

@ericmj
Copy link
Member

@ericmj ericmj commented Mar 9, 2026

  • Stream tarball downloads to disk via Store.get_to_file instead of loading full binary into memory
  • Stream file uploads via put_file! to avoid File.read! on every doc
  • Add TmpDir GenServer for process-based temp file cleanup
  • Add put_file! to Store behaviour and backends (GS, S3, Local)
  • Fix flaky debouncer test grace time
  • Fix unsafe paths test to assert on error logs

ericmj added 2 commits March 9, 2026 23:23
- Stream tarball downloads to disk via Store.get_to_file instead of
  loading full binary into memory
- Stream file uploads via put_file! to avoid File.read! on every doc
- Add TmpDir GenServer for process-based temp file cleanup
- Add put_file! to Store behaviour and backends (GS, S3, Local)
- Fix flaky debouncer test grace time
- Fix unsafe paths test to assert on error logs
Use GenServer.call instead of cast in track/1 so the monitor is set up
synchronously before the caller can exit. Replace Process.sleep with
deterministic waiting: monitor the task, wait for :DOWN, then sync with
the GenServer via :sys.get_state to ensure cleanup has been processed.
@ericmj ericmj merged commit d573c80 into main Mar 9, 2026
8 checks passed
@ericmj ericmj deleted the ericmj/stream-downloads branch March 9, 2026 23:31
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.

1 participant