aboutsummaryrefslogtreecommitdiff
path: root/weed/operation/assign_file_id.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2021-12-22 16:05:43 -0800
committerchrislu <chris.lu@gmail.com>2021-12-22 16:05:43 -0800
commit2bc6fa90ff8a1f3aef8318cb90712c3f23729f7f (patch)
treebaa3098898d9600c0632fd8e5d1a056a712c71a2 /weed/operation/assign_file_id.go
parent0ec7bc6710350dec395b33ba44589ee1875586c0 (diff)
parent4e73705533c1a8510cd6b3308af37fc851803ed3 (diff)
downloadseaweedfs-2bc6fa90ff8a1f3aef8318cb90712c3f23729f7f.tar.xz
seaweedfs-2bc6fa90ff8a1f3aef8318cb90712c3f23729f7f.zip
Merge branch 'master' of https://github.com/chrislusf/seaweedfs
Diffstat (limited to 'weed/operation/assign_file_id.go')
-rw-r--r--weed/operation/assign_file_id.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/weed/operation/assign_file_id.go b/weed/operation/assign_file_id.go
index b4d44eccf..f0f7581f3 100644
--- a/weed/operation/assign_file_id.go
+++ b/weed/operation/assign_file_id.go
@@ -133,6 +133,7 @@ type StorageOption struct {
Collection string
DataCenter string
Rack string
+ DataNode string
TtlSeconds int32
Fsync bool
VolumeGrowthCount uint32
@@ -151,9 +152,10 @@ func (so *StorageOption) ToAssignRequests(count int) (ar *VolumeAssignRequest, a
DiskType: so.DiskType,
DataCenter: so.DataCenter,
Rack: so.Rack,
+ DataNode: so.DataNode,
WritableVolumeCount: so.VolumeGrowthCount,
}
- if so.DataCenter != "" || so.Rack != "" {
+ if so.DataCenter != "" || so.Rack != "" || so.DataNode != "" {
altRequest = &VolumeAssignRequest{
Count: uint64(count),
Replication: so.Replication,
@@ -162,6 +164,7 @@ func (so *StorageOption) ToAssignRequests(count int) (ar *VolumeAssignRequest, a
DiskType: so.DiskType,
DataCenter: "",
Rack: "",
+ DataNode: "",
WritableVolumeCount: so.VolumeGrowthCount,
}
}