feat: async chunk upload, dynamic part sizing for multi-TB uploads, and RUFH compliance improvements - #138
Open
tomdesair wants to merge 6 commits into
Open
feat: async chunk upload, dynamic part sizing for multi-TB uploads, and RUFH compliance improvements#138tomdesair wants to merge 6 commits into
tomdesair wants to merge 6 commits into
Conversation
- Skip redundant isLockExpired pre-check in S3LockingService for optimistic conditional PutObject - Batch delete .lock and .stop keys via S3 Multi-Object Delete in S3UploadLock - Clean up unused deleteS3LockObjectIfOwner and deleteS3ObjectQuietly methods - Remove createMinioContainer alias from TestUtils and clarify RustFS Testcontainers setup - Update CHANGELOG.md
… streamlined constructors - Added configurable jitter bounds (withJitter) in AbstractLeaseLockingService and S3LockingService defaulting to 20-60 ms, with zero-jitter support (0, 0) for pure AWS S3 / Cloudflare R2 deployments. - Implemented automatic non-CAS fallback in S3LockingService when If-None-Match: * returns HTTP 501 / NotImplemented (supporting Backblaze B2, Ceph RGW) along with withS3ConditionalWritesSupported(boolean) override. - Streamlined S3LockingService constructors to minimal required set (basic 2-arg and full 6-arg). - Clarified locking documentation and inline comments regarding lock arbitration on non-CAS backends.
- Add withLockWaitTimeout(Duration) and getLockWaitTimeout() to TusFileUploadService (default 60s) - Derive max lock retries (timeout / 200ms, default 300) and cloud upload chunk drain timeout (timeout - 5s, default 55s) - Update AsyncChunkUploader, UploadStorageService, S3StorageService, AzureBlobStorageService, DiskStorageService, and ThreadLocalCachedStorageAndLockingService to configure and propagate drain timeout - Update documentation in README.md, CHANGELOG.md, docs/LOCKING.md, docs/S3_STORAGE.md, and docs/AZURE_BLOB_STORAGE.md with lock wait terminology - Add unit tests for timeout derivation, validation, storage synchronization, and cache delegation
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.
Summary of Changes
This pull request introduces asynchronous chunk uploading for cloud storage backends, adds dynamic part sizing to reliably support multi-TB uploads (up to 5 TB), and incorporates compliance improvements for both Tus v1.0.0 and IETF Resumable Uploads for HTTP (RUFH).
1. Asynchronous Chunk Upload Pipeline
AsyncChunkUploadermanaging bounded in-flight cloud part uploads concurrently viauploadExecutor.drainAndComplete()), ensuring sequential block/part tracking while maximizing network throughput.2. Multi-TB Upload Support & Dynamic Part Sizing
calcOptimalPartSize(expectedLength)across storage services.preferredPartSize/preferredBlockSizewith fluent builders onTusFileUploadService.3. Exemption of Completing Uploads from Min-Append-Size (§4.1.4)
Upload-Complete: ?1or requests reaching full length bypass themin-append-sizeconstraint.RufhCreationPostRequestHandlerandRufhAppendPatchRequestHandlerto resolve announced length fromContent-Lengthon completing uploads per §4.2.1.S3StorageServiceTest,ITAzureBlobStorageService,RufhCreationPostRequestHandlerTest,RufhAppendPatchRequestHandlerTest, andAbstractITRufhProtocol.4. Interim Response Endpoint Isolation
RufhInterimResponseUtilto verify that the request target corresponds to the service's configured creation endpoint viaUtils.isCreationEndpoint().5. Tus v1.0.0 & RUFH Conformity Test Suites
scripts/tus_conformity_test.pycovering Tus v1.0.0 specification requirements.docs/CONFORMITY_TESTING.mdandREADME.mdto document default test execution across all three storage backends (Disk, S3, Azure).TusFileUploadServiceto prevent Spring Boot error controller degradation to 500.