Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 746dbef

Browse files
committed
refactor: sharding config in go-ipfs 0.11
Experimental.ShardingEnabled was replaced by autosharding. To simulate the old behavior ("shard everything") one needs to set Internal.UnixFSShardingSizeThreshold to 1B. This is a temporary fix for sharding tests until js-ipfs implements ipfs/js-ipfs-unixfs#149
1 parent ab80fc4 commit 746dbef

File tree

9 files changed

+27
-27
lines changed

9 files changed

+27
-27
lines changed

packages/interface-ipfs-core/src/add.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -463,9 +463,9 @@ export function testAdd (factory, options) {
463463
sharding: true
464464
},
465465
config: {
466-
// enable sharding for go
467-
Experimental: {
468-
ShardingEnabled: true
466+
// enable sharding for go with automatic threshold dropped to the minimum so it shards everything
467+
Internal: {
468+
UnixFSShardingSizeThreshold: '1B'
469469
}
470470
}
471471
}

packages/interface-ipfs-core/src/files/cp.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -358,9 +358,9 @@ export function testCp (factory, options) {
358358
sharding: true
359359
},
360360
config: {
361-
// enable sharding for go
362-
Experimental: {
363-
ShardingEnabled: true
361+
// enable sharding for go with automatic threshold dropped to the minimum so it shards everything
362+
Internal: {
363+
UnixFSShardingSizeThreshold: '1B'
364364
}
365365
}
366366
}

packages/interface-ipfs-core/src/files/ls.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,9 @@ export function testLs (factory, options) {
174174
sharding: true
175175
},
176176
config: {
177-
// enable sharding for go
178-
Experimental: {
179-
ShardingEnabled: true
177+
// enable sharding for go with automatic threshold dropped to the minimum so it shards everything
178+
Internal: {
179+
UnixFSShardingSizeThreshold: '1B'
180180
}
181181
}
182182
}

packages/interface-ipfs-core/src/files/mkdir.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,9 @@ export function testMkdir (factory, options) {
235235
sharding: true
236236
},
237237
config: {
238-
// enable sharding for go
239-
Experimental: {
240-
ShardingEnabled: true
238+
// enable sharding for go with automatic threshold dropped to the minimum so it shards everything
239+
Internal: {
240+
UnixFSShardingSizeThreshold: '1B'
241241
}
242242
}
243243
}

packages/interface-ipfs-core/src/files/mv.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ export function testMv (factory, options) {
120120
sharding: true
121121
},
122122
config: {
123-
// enable sharding for go
124-
Experimental: {
125-
ShardingEnabled: true
123+
// enable sharding for go with automatic threshold dropped to the minimum so it shards everything
124+
Internal: {
125+
UnixFSShardingSizeThreshold: '1B'
126126
}
127127
}
128128
}

packages/interface-ipfs-core/src/files/read.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ export function testRead (factory, options) {
124124
sharding: true
125125
},
126126
config: {
127-
// enable sharding for go
128-
Experimental: {
129-
ShardingEnabled: true
127+
// enable sharding for go with automatic threshold dropped to the minimum so it shards everything
128+
Internal: {
129+
UnixFSShardingSizeThreshold: '1B'
130130
}
131131
}
132132
}

packages/interface-ipfs-core/src/files/rm.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ export function testRm (factory, options) {
143143
sharding: true
144144
},
145145
config: {
146-
// enable sharding for go
147-
Experimental: {
148-
ShardingEnabled: true
146+
// enable sharding for go with automatic threshold dropped to the minimum so it shards everything
147+
Internal: {
148+
UnixFSShardingSizeThreshold: '1B'
149149
}
150150
}
151151
}

packages/interface-ipfs-core/src/files/stat.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -382,9 +382,9 @@ export function testStat (factory, options) {
382382
sharding: true
383383
},
384384
config: {
385-
// enable sharding for go
386-
Experimental: {
387-
ShardingEnabled: true
385+
// enable sharding for go with automatic threshold dropped to the minimum so it shards everything
386+
Internal: {
387+
UnixFSShardingSizeThreshold: '1B'
388388
}
389389
}
390390
}

packages/interface-ipfs-core/src/files/write.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -661,9 +661,9 @@ export function testWrite (factory, options) {
661661
sharding: true
662662
},
663663
config: {
664-
// enable sharding for go
665-
Experimental: {
666-
ShardingEnabled: true
664+
// enable sharding for go with automatic threshold dropped to the minimum so it shards everything
665+
Internal: {
666+
UnixFSShardingSizeThreshold: '1B'
667667
}
668668
}
669669
}

0 commit comments

Comments
 (0)