refactor: remove dead OptimizedFileContent::Mmap variant
OptimizedFileContent::Mmap was constructed nowhere — the documented "Tier 2: memory-mapped I/O (10-100 MB)" path was never wired, so optimized_inner only ever returns Bytes (<10 MB) or Stream (>=10 MB). The variant survived only as an enum case plus two dead match arms in the file and share download handlers. Remove the variant and its arms, and fix the now-misleading retrieval-service tier docs (everything >=10 MB streams via CDC chunk reassembly with the backend read-ahead; there is no mmap tier). Behaviour is unchanged — the deleted arms were unreachable. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JG5yYZ9s868mJwqT2Qz7ez
This commit is contained in:
@@ -26,8 +26,8 @@ const CACHE_THRESHOLD: u64 = 10 * 1024 * 1024;
|
||||
/// Implements a multi-tier download strategy:
|
||||
/// - Tier 0: Write-behind cache (just-uploaded files still in RAM)
|
||||
/// - Tier 1: Hot cache + optional WebP transcoding (<10 MB)
|
||||
/// - Tier 2: Memory-mapped I/O (10–100 MB)
|
||||
/// - Tier 3: Streaming (≥100 MB)
|
||||
/// - Tier 2: Streaming for everything ≥10 MB — CDC chunk reassembly with the
|
||||
/// backend's read-ahead (`read_prefetch`); no whole-file buffering.
|
||||
pub struct FileRetrievalService {
|
||||
file_read: Arc<FileBlobReadRepository>,
|
||||
content_cache: Option<Arc<FileContentCache>>,
|
||||
|
||||
Reference in New Issue
Block a user