Skip to content

Commit 8bdddda

Browse files
committed
Rename chunkSize with partSize for minio storage
1 parent dff8e0e commit 8bdddda

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

packaging/conf/pbm-conf-reference.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
# signature-ver: V4
105105

106106
## The size of data chunks in bytes to be uploaded to the storage bucket in a single request.
107-
# chunkSize: 10485760
107+
# partSize: 10485760
108108

109109
## Data upload configuration
110110
# maxUploadParts: 10,000

pbm/config/config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ func TestIsSameStorage(t *testing.T) {
167167
SessionToken: "sess",
168168
},
169169
Secure: true,
170-
ChunkSize: 6 << 20,
170+
PartSize: 6 << 20,
171171
Retryer: &mio.Retryer{},
172172
}
173173
eq := &mio.Config{

pbm/storage/mio/config.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type Config struct {
1717
Secure bool `bson:"secure" json:"secure" yaml:"secure"`
1818
DebugTrace bool `bson:"debugTrace,omitempty" json:"debugTrace,omitempty" yaml:"debugTrace,omitempty"`
1919

20-
ChunkSize int64 `bson:"chunkSize,omitempty" json:"chunkSize,omitempty" yaml:"chunkSize,omitempty"`
20+
PartSize int64 `bson:"partSize,omitempty" json:"partSize,omitempty" yaml:"partSize,omitempty"`
2121
MaxObjSizeGB *float64 `bson:"maxObjSizeGB,omitempty" json:"maxObjSizeGB,omitempty" yaml:"maxObjSizeGB,omitempty"`
2222

2323
Retryer *Retryer `bson:"retryer,omitempty" json:"retryer,omitempty" yaml:"retryer,omitempty"`
@@ -87,8 +87,8 @@ func (cfg *Config) Cast() error {
8787
return errors.New("endpointURL cannot be empty")
8888
}
8989

90-
if cfg.ChunkSize == 0 {
91-
cfg.ChunkSize = defaultPartSize
90+
if cfg.PartSize == 0 {
91+
cfg.PartSize = defaultPartSize
9292
}
9393

9494
if cfg.Retryer == nil {

pbm/storage/mio/config_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func TestClone(t *testing.T) {
2121
SessionToken: "sess",
2222
},
2323
Secure: true,
24-
ChunkSize: 6 << 20,
24+
PartSize: 6 << 20,
2525
MaxObjSizeGB: &f,
2626
Retryer: &Retryer{
2727
NumMaxRetries: 1,
@@ -54,7 +54,7 @@ func TestEqual(t *testing.T) {
5454
SessionToken: "sess",
5555
},
5656
Secure: true,
57-
ChunkSize: 6 << 20,
57+
PartSize: 6 << 20,
5858
MaxObjSizeGB: &f,
5959
Retryer: &Retryer{
6060
NumMaxRetries: 1,
@@ -82,7 +82,7 @@ func TestCast(t *testing.T) {
8282
}
8383
want := &Config{
8484
EndpointURL: "url",
85-
ChunkSize: defaultPartSize,
85+
PartSize: defaultPartSize,
8686
Retryer: &Retryer{
8787
NumMaxRetries: defaultMaxRetries,
8888
},

pbm/storage/mio/minio.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func (m *Minio) Save(name string, data io.Reader, options ...storage.Option) err
144144
defaultPartSize,
145145
minPartSize,
146146
maxUploadParts,
147-
m.cfg.ChunkSize,
147+
m.cfg.PartSize,
148148
)
149149

150150
if m.log != nil && opts.UseLogger {

0 commit comments

Comments
 (0)