feat: add native Storj support via storj.io/uplink#6763
Open
solracsf wants to merge 1 commit intojuicedata:mainfrom
Open
feat: add native Storj support via storj.io/uplink#6763solracsf wants to merge 1 commit intojuicedata:mainfrom
solracsf wants to merge 1 commit intojuicedata:mainfrom
Conversation
b8920c9 to
5846298
Compare
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
e4dfc8c to
6da76b3
Compare
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.
Fix #1655
ToDo
JuiceFS could only reach Storj through the S3-compatible MT or ST gateway. Both gateways have a critical limitation:
ListObjectsdoes not return results in lexicographic order. This breaks several JuiceFS operations that rely on sorted object iteration.Add a new backend (
--storage storj) that communicates directly with the Storj satellite via the native storj.io/uplink library, bypassing the gateway entirely.Usage:
The
--access-keyflag takes a Storj serialised Access Grant string.--secret-keyis unused with this backend.The native uplink API also does not guarantee lexicographic order. Both
ListandListAllcollect the full result set from the iterator, sort it withsort.Slice, then return/stream in order. This makesgc,fsck,sync, anddestroywork correctly without workarounds.Three
envvars control the two connection pools:STORJ_CONN_CAPACITYTotal cached connections to storage nodes (default to 100)STORJ_CONN_KEY_CAPACITYCached connections per storage node (default to 5)STORJ_SAT_CONN_CAPACITYTotal cached connections to the satellite (default to 10)All three accept a non-negative integer; set to 0 to disable pooling. Invalid or unset values silently fall back to the defaults. The idle expiration on both pools is 2 minutes, matching what the uplink library's own default pool uses.
Example: tighten connections to reduce open-file descriptors on a busy/low-CPU host:
STORJ_CONN_CAPACITY=40 STORJ_CONN_KEY_CAPACITY=2 juicefs mount ...OBJbench tests