mirror of
https://github.com/actions/toolkit
synced 2025-05-10 09:03:02 +00:00
updated segment size to 128MB for failing fast
This commit is contained in:
parent
f3de1e53d6
commit
e6e7b6156f
1 changed files with 3 additions and 1 deletions
4
packages/cache/src/internal/downloadUtils.ts
vendored
4
packages/cache/src/internal/downloadUtils.ts
vendored
|
@ -242,7 +242,9 @@ export async function downloadCacheStorageSDK(
|
|||
// If the file exceeds the buffer maximum length (~1 GB on 32-bit systems and ~2 GB
|
||||
// on 64-bit systems), split the download into multiple segments
|
||||
// ~2 GB = 2147483647, beyond this, we start getting out of range error. So, capping it accordingly.
|
||||
const maxSegmentSize = Math.min(2147483647, buffer.constants.MAX_LENGTH)
|
||||
|
||||
// Updated segment size to 128MB to complete a segment faster and fail fast
|
||||
const maxSegmentSize = Math.min(134217728, buffer.constants.MAX_LENGTH)
|
||||
const downloadProgress = new DownloadProgress(contentLength)
|
||||
|
||||
const fd = fs.openSync(archivePath, 'w')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue