[master] grow volumes if no writable volumes in current dataCenter (#5434)
* grow volumes if no writable volumes in current dataCenter https://github.com/seaweedfs/seaweedfs/issues/3886 * fix tests with volume grow * automatic volume grow one volume * add ErrorChunkAssign metrics
This commit is contained in:
committed by
GitHub
parent
df40908e57
commit
9c1e0f5811
@@ -6,6 +6,7 @@ import (
|
||||
"github.com/seaweedfs/seaweedfs/weed/pb"
|
||||
"github.com/seaweedfs/seaweedfs/weed/pb/master_pb"
|
||||
"github.com/seaweedfs/seaweedfs/weed/security"
|
||||
"github.com/seaweedfs/seaweedfs/weed/stats"
|
||||
"github.com/seaweedfs/seaweedfs/weed/storage/needle"
|
||||
"google.golang.org/grpc"
|
||||
"sync"
|
||||
@@ -193,6 +194,7 @@ func Assign(masterFn GetMasterFn, grpcDialOption grpc.DialOption, primaryRequest
|
||||
})
|
||||
|
||||
if lastError != nil {
|
||||
stats.FilerHandlerCounter.WithLabelValues(stats.ErrorChunkAssign).Inc()
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -262,6 +264,7 @@ func (so *StorageOption) ToAssignRequests(count int) (ar *VolumeAssignRequest, a
|
||||
WritableVolumeCount: so.VolumeGrowthCount,
|
||||
}
|
||||
if so.DataCenter != "" || so.Rack != "" || so.DataNode != "" {
|
||||
ar.WritableVolumeCount = uint32(count)
|
||||
altRequest = &VolumeAssignRequest{
|
||||
Count: uint64(count),
|
||||
Replication: so.Replication,
|
||||
|
||||
Reference in New Issue
Block a user