File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
- const kWriteFileMaxChunkSize = 2 ** 14 ;
4
-
5
3
const {
6
4
ArrayPrototypePush,
7
5
Error,
@@ -40,6 +38,7 @@ const {
40
38
kMaxUserId,
41
39
kReadFileBufferLength,
42
40
kReadFileUnknownBufferLength,
41
+ kWriteFileMaxChunkSize
43
42
} ,
44
43
copyObject,
45
44
getDirents,
Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ const kIoMaxLength = 2 ** 31 - 1;
125
125
// blocking other threads in case the available threads are all in use.
126
126
const kReadFileUnknownBufferLength = 64 * 1024 ;
127
127
const kReadFileBufferLength = 512 * 1024 ;
128
+ const kWriteFileMaxChunkSize = 512 * 1024 ;
128
129
129
130
const kMaxUserId = 2 ** 32 - 1 ;
130
131
@@ -835,6 +836,7 @@ module.exports = {
835
836
kMaxUserId,
836
837
kReadFileBufferLength,
837
838
kReadFileUnknownBufferLength,
839
+ kWriteFileMaxChunkSize
838
840
} ,
839
841
assertEncoding,
840
842
BigIntStats, // for testing
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ async function validateWriteFile() {
34
34
async function doWriteAndCancel ( ) {
35
35
const filePathForHandle = path . resolve ( tmpDir , 'dogs-running.txt' ) ;
36
36
const fileHandle = await open ( filePathForHandle , 'w+' ) ;
37
- const buffer = Buffer . from ( 'dogs running' . repeat ( 10000 ) , 'utf8' ) ;
37
+ const buffer = Buffer . from ( 'dogs running' . repeat ( 512 * 1024 ) , 'utf8' ) ;
38
38
const controller = new AbortController ( ) ;
39
39
const { signal } = controller ;
40
40
process . nextTick ( ( ) => controller . abort ( ) ) ;
You can’t perform that action at this time.
0 commit comments