Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
c1b72f8
progress
frhuelsz Jan 14, 2026
bffd78b
Merge branch 'user/frhuelsz/direct-stream/http-file' into user/frhuel…
frhuelsz Jan 14, 2026
f53770b
Subfile-reader
frhuelsz Jan 15, 2026
78d53a9
traces
frhuelsz Jan 15, 2026
3deb961
unused import
frhuelsz Jan 15, 2026
f022b20
Progress
frhuelsz Jan 15, 2026
e33e36f
resilient retry
frhuelsz Jan 15, 2026
15bc2e6
Retries, fix range off-by-one
frhuelsz Jan 15, 2026
3394632
Fix UTs
frhuelsz Jan 15, 2026
fd39cc2
Progress
frhuelsz Jan 16, 2026
59b5983
Doc comments
frhuelsz Jan 16, 2026
751384f
Deterministic UTs
frhuelsz Jan 16, 2026
7753477
Fix header
frhuelsz Jan 16, 2026
33cba7f
remove unnecessary header
frhuelsz Jan 16, 2026
d14eb28
typo
frhuelsz Jan 16, 2026
1526608
Less logging
frhuelsz Jan 16, 2026
dad2948
Support easy building binary on ubuntu 24
frhuelsz Jan 16, 2026
c11ccfd
pre-fetch crates
frhuelsz Jan 16, 2026
dfad5f1
Smart detection
frhuelsz Jan 16, 2026
9de128d
Undo change
frhuelsz Jan 16, 2026
5535533
Merge branch 'user/frhuelsz/build-on-ubuntu-24' into user/frhuelsz/di…
frhuelsz Jan 16, 2026
53867ee
add trident version
frhuelsz Jan 16, 2026
deca4d1
typos
frhuelsz Jan 16, 2026
253d047
pr comments
frhuelsz Jan 16, 2026
38fcc6a
100% UT coverage
frhuelsz Jan 17, 2026
c0a4a67
PR comment
frhuelsz Jan 17, 2026
672573a
fix typo in test string
frhuelsz Jan 17, 2026
7deeee3
Fix typo in doc comment
frhuelsz Jan 17, 2026
2311bf3
Fix use struct as imported.
frhuelsz Jan 17, 2026
c4bba2d
Merge branch 'main' into user/frhuelsz/direct-stream/subfile-reader
frhuelsz Jan 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions crates/trident/src/io_utils/file_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use anyhow::{bail, ensure, Error};
use log::debug;
use url::Url;

use super::http_file::HttpFile;
use super::http::HttpFile;

/// A trait for types that implement both `Read` and `Seek`, used to return
/// dynamic objects implementing both traits.
Expand Down Expand Up @@ -95,7 +95,7 @@ impl FileReader {
Box::new(file.take(size))
}

Self::Http(http_file) => Box::new(http_file.section_reader(section_offset, size)?),
Self::Http(http_file) => Box::new(http_file.section_reader(section_offset, size)),

#[cfg(test)]
Self::Buffer(cursor) => {
Expand All @@ -118,7 +118,7 @@ impl FileReader {
Box::new(File::open(file_path)?)
}

Self::Http(http_file) => Box::new(http_file.section_reader(0, http_file.size)?),
Self::Http(http_file) => Box::new(http_file.complete_reader()),

#[cfg(test)]
Self::Buffer(cursor) => {
Expand Down Expand Up @@ -292,8 +292,7 @@ mod tests {
// Test read the whole thing, do not specify a range.
let mut buf = String::new();
let read = http_file
.reader(None, None)
.unwrap()
.complete_reader()
.read_to_string(&mut buf)
.unwrap();
assert_eq!(read, body.len(), "Did not read expected number of bytes");
Expand All @@ -311,7 +310,6 @@ mod tests {
let mut buf = String::new();
let read = http_file
.section_reader(start as u64, size as u64)
.unwrap()
.read_to_string(&mut buf)
.unwrap();
trace!("Read: '{}' ({} bytes)", buf, read);
Expand Down
Loading
Loading