diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-11-17 01:00:02 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-11-17 01:00:02 -0800 |
| commit | dc304342b2a5113d402833b024c2123ac70fb162 (patch) | |
| tree | 081a747589b6bebfaf25488ebbd15571a74c5d67 /weed/operation/assign_file_id.go | |
| parent | b04375a3d145a0a833ec7d1fddba620c3d259687 (diff) | |
| download | seaweedfs-dc304342b2a5113d402833b024c2123ac70fb162.tar.xz seaweedfs-dc304342b2a5113d402833b024c2123ac70fb162.zip | |
fs.configure: configurable volume growth
Diffstat (limited to 'weed/operation/assign_file_id.go')
| -rw-r--r-- | weed/operation/assign_file_id.go | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/weed/operation/assign_file_id.go b/weed/operation/assign_file_id.go index 4b9ac2f2c..5fe3462e9 100644 --- a/weed/operation/assign_file_id.go +++ b/weed/operation/assign_file_id.go @@ -104,12 +104,13 @@ func LookupJwt(master string, fileId string) security.EncodedJwt { } type StorageOption struct { - Replication string - Collection string - DataCenter string - Rack string - TtlSeconds int32 - Fsync bool + Replication string + Collection string + DataCenter string + Rack string + TtlSeconds int32 + Fsync bool + VolumeGrowthCount uint32 } func (so *StorageOption) TtlString() string { @@ -118,21 +119,23 @@ func (so *StorageOption) TtlString() string { func (so *StorageOption) ToAssignRequests(count int) (ar *VolumeAssignRequest, altRequest *VolumeAssignRequest) { ar = &VolumeAssignRequest{ - Count: uint64(count), - Replication: so.Replication, - Collection: so.Collection, - Ttl: so.TtlString(), - DataCenter: so.DataCenter, - Rack: so.Rack, + Count: uint64(count), + Replication: so.Replication, + Collection: so.Collection, + Ttl: so.TtlString(), + DataCenter: so.DataCenter, + Rack: so.Rack, + WritableVolumeCount: so.VolumeGrowthCount, } if so.DataCenter != "" || so.Rack != "" { altRequest = &VolumeAssignRequest{ - Count: uint64(count), - Replication: so.Replication, - Collection: so.Collection, - Ttl: so.TtlString(), - DataCenter: "", - Rack: "", + Count: uint64(count), + Replication: so.Replication, + Collection: so.Collection, + Ttl: so.TtlString(), + DataCenter: "", + Rack: "", + WritableVolumeCount: so.VolumeGrowthCount, } } return |
