Improvment/disk streaming - #8
Merged
Merged
Conversation
… tests * Update documentation while at it to reflect current state. Signed-off-by: Harshit Jain <reach@harsh1998.dev>
- Updated MAX_UPLOAD_RAM_USAGE from 256MB to 128MB - Uploads > 128MB now use disk-based streaming to limit memory usage - Updated memory usage tests to reflect new threshold (64MB vs 150MB) - All tests passing including stress tests and upload integration tests - Maintains backward compatibility and performance for smaller uploads
- Add RequestBody enum with Memory and File variants for efficient handling - Implement automatic streaming logic: small uploads in memory, large to disk - Update upload handlers to work with new RequestBody structure - Add comprehensive HTTP streaming tests - Update all test files to use new RequestBody API - Fix clippy warnings and maintain code quality - Achieve scalability and resource protection for large uploads
- Rewrite extract_part_data method to use streaming approach instead of loading entire files into memory - Process multipart data in chunks while maintaining boundary detection capability - Fix hanging issue with test_multiple_large_files_bash_verification (85MB test case) - Remove unused STREAM_BUFFER_SIZE constant to fix clippy warnings - Maintain memory efficiency for large file uploads while preserving all security validations - All tests pass including the previously hanging bash verification test
- Enhanced create_memory_efficient_part_reader with 64KB chunked processing - Reduced memory spikes during large file uploads by progressive buffer draining - Maintained all existing functionality and security validations - Improved scalability for concurrent large uploads - All 86 tests passing with clean code quality (fmt + clippy) Key improvements: - Process data in 64KB chunks instead of loading entire parts - Dynamic buffer management with immediate memory release - Boundary detection optimization with minimal buffer retention - Early size validation to prevent memory exhaustion Memory footprint reduced from potentially GB-sized buffers to KB-sized working sets.
- Update Cargo.toml, CLI, and all source files to version 2.5.1 - Update web templates and error pages with new version - Update all documentation references to reflect v2.5.1 - Update server headers and health endpoints to report 2.5.1 - Update INI configuration with direct streaming terminology - Remove redundant 10GB references, replace with unlimited support - Update README and docs to reflect direct streaming architecture - All tests pass and build successful
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.
No description provided.