Repository navigation
Conversation
ByteStreamPipe::get_object opens {buffer_path}/{hash}.{ts}.buffer with
create(true), but nothing ensures buffer_path itself exists. On a fresh
working directory every download then fails with ENOENT and the whole
transfer aborts. Create the directory (and parents) up front.
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Index buffer writes also need directory initialization.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Creates the configured buffer directory before streamed downloads to prevent missing-directory failures.
Changes:
- Recursively creates the buffer directory in
ByteStreamPipe::get_object. - Generated index buffer writes still bypass this initialization.
| File | Changes | Review status |
|---|---|---|
src/stream_pipe.rs |
Initializes the buffer directory before download files are created. | Moderate unresolved issue: index pipelines can still fail with ENOENT on fresh deployments. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| async fn get_object(&self, snapshot: &Snapshot, mission: &Mission) -> Result<ByteStream> { | ||
| let transfer_url = self.source.get_object(snapshot, mission).await?; | ||
|
|
||
| tokio::fs::create_dir_all(&self.buffer_path).await?; |
IndexPipe::get_object writes generated *.buffer files into buffer_path with the same create(true) pattern as ByteStreamPipe. Apply the same create_dir_all so a fresh working directory does not fail with ENOENT when an index update runs before any download.
Contributor
Author
|
Good catch — IndexPipe::get_object had the same create-without-mkdir pattern on buffer_path. Fixed in 02134d5 by calling create_dir_all there as well. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

ByteStreamPipe::get_objectopens{buffer_path}/{hash}.{ts}.bufferwithcreate(true), but nothing ensuresbuffer_pathitself exists. On a fresh working directory (e.g. a new mirror deployment that did not manuallymkdir .tmp), every download fails with ENOENT and the whole transfer aborts.Create the buffer directory (including parents) up front. This matches
FileBackend::put_object, which already doescreate_dir_allfor its target directory.