-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(s3): upload file bigger than 50GB #7067
base: master
Are you sure you want to change the base?
Conversation
6b9b129
to
676851e
Compare
also Put object part with a prevalculated md5 and size doesn'c consume additionnal memory against presigned + raw upload
@xen-orchestra/fs/src/s3.js
Outdated
if (this._readCounter === undefined) { | ||
this._readCounter = 0 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a closure (variable outside of the function) and initialize it to 0
.
region = guessAwsRegion(host), | ||
} = parse(url) | ||
const client = new S3Client({ | ||
apiVersion: '2006-03-01', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this really what we want?
keepAlive: true, | ||
}), | ||
}), | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see we are not passing tls
option, is this necessary in our S3 implementation?
@xen-orchestra/fs/testupload.mjs
Outdated
while((data = await read(inputStream, Math.min(remainingBytes, maxChunkPartSize))) !== null){ | ||
remainingBytes = await write(data, chunkStream, remainingBytes) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why a loop? Doesn't the first read give you everything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for padding, but we should use a TransformStream
instead for better perf (less buffering).
552951b
to
4d10e26
Compare
Description
chunk size computation
Chunk size is (length ?? maxLength ) / 10 000 . (min 5MB, max 500MB).
can be computed from disk utilization (for an xva export) or disk size (for a mirror backup)
Transfer strategy
lib-storage
I think we should use 2 on non object locked, non encrypted backup repository, and 5 in other. A file configuration should be present to force the fallback to lib-storage
To do
Checklist
Fixes #007
,See xoa-support#42
,See https://...
)Introduced by
CHANGELOG.unreleased.md