Skip to content

Commit

Permalink
fix: set client default chunk size to 50MB (#2227)
Browse files Browse the repository at this point in the history
Setting default chunk size to 50MB to
save us 5x in number of indexes needed to write/read R2
  • Loading branch information
vasco-santos committed Feb 28, 2023
1 parent d36f3bc commit e34c2ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/client/src/lib.js
Expand Up @@ -31,7 +31,7 @@ import {

const MAX_PUT_RETRIES = 5
const MAX_CONCURRENT_UPLOADS = 3
const DEFAULT_CHUNK_SIZE = 1024 * 1024 * 10 // chunk to ~10MB CARs
const DEFAULT_CHUNK_SIZE = 1024 * 1024 * 50 // chunk to ~50MB CARs
const MAX_BLOCK_SIZE = 1048576
const MAX_CHUNK_SIZE = 104857600
// These match what is enforced server-side
Expand Down
2 changes: 1 addition & 1 deletion packages/client/test/put.spec.js
Expand Up @@ -144,7 +144,7 @@ describe('put', () => {
uploadedChunks++
}
})
assert.ok(uploadedChunks >= 100)
assert.ok(uploadedChunks >= 20)
})

it('aborts', async () => {
Expand Down

0 comments on commit e34c2ac

Please sign in to comment.