Skip to content

Commit 631f307

Browse files
authored
fix: set client default chunk size to 50MB (#2331)
Setting default chunk size to 50MB to save us 5x in number of indexes needed to write/read R2
1 parent 5fe1bf9 commit 631f307

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

packages/client/src/lib.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import pipe from 'it-pipe'
2828

2929
const MAX_STORE_RETRIES = 5
3030
const MAX_CONCURRENT_UPLOADS = 3
31-
const MAX_CHUNK_SIZE = 1024 * 1024 * 10 // chunk to ~10MB CARs
31+
const MAX_CHUNK_SIZE = 1024 * 1024 * 50 // chunk to ~50MB CARs
3232
const RATE_LIMIT_REQUESTS = 30
3333
const RATE_LIMIT_PERIOD = 10 * 1000
3434

packages/client/test/lib.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ describe('client', () => {
191191
uploadedChunks++
192192
},
193193
})
194-
assert.ok(uploadedChunks >= 12)
194+
assert.ok(uploadedChunks >= 3)
195195
assert.equal(cid, expectedCid)
196196
})
197197

0 commit comments

Comments
 (0)