Set correct default erasure share size for libuplink (#2376)

This commit is contained in:
Kaloyan Raev 2019-06-28 13:23:59 +03:00 committed by GitHub
parent 7bbd3bcbb4
commit f3dc866889
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,7 +83,7 @@ func (cfg *BucketConfig) setDefaults() {
cfg.Volatile.RedundancyScheme.TotalShares = 130
}
if cfg.Volatile.RedundancyScheme.ShareSize == 0 {
cfg.Volatile.RedundancyScheme.ShareSize = (1 * memory.KiB).Int32()
cfg.Volatile.RedundancyScheme.ShareSize = 256 * memory.B.Int32()
}
if cfg.EncryptionParameters.BlockSize == 0 {
cfg.EncryptionParameters.BlockSize = cfg.Volatile.RedundancyScheme.ShareSize * int32(cfg.Volatile.RedundancyScheme.RequiredShares)