可以在集群设置中修改节点最大并发读/写数

This commit is contained in:
刘祥超
2024-04-30 19:08:51 +08:00
parent 4e4acc327d
commit 97c6776809
6 changed files with 963 additions and 889 deletions

View File

@@ -46,8 +46,10 @@ type NodeCluster struct {
AutoRemoteStart bool `protobuf:"varint,19,opt,name=autoRemoteStart,proto3" json:"autoRemoteStart,omitempty"`
AutoInstallNftables bool `protobuf:"varint,20,opt,name=autoInstallNftables,proto3" json:"autoInstallNftables,omitempty"`
SshParamsJSON []byte `protobuf:"bytes,21,opt,name=sshParamsJSON,proto3" json:"sshParamsJSON,omitempty"`
AutoSystemTuning bool `protobuf:"varint,23,opt,name=autoSystemTuning,proto3" json:"autoSystemTuning,omitempty"` // 是否自动调节系统参数
AutoTrimDisks bool `protobuf:"varint,24,opt,name=autoTrimDisks,proto3" json:"autoTrimDisks,omitempty"` // 是否自动TRIM硬盘
AutoSystemTuning bool `protobuf:"varint,23,opt,name=autoSystemTuning,proto3" json:"autoSystemTuning,omitempty"` // 是否自动调节系统参数
AutoTrimDisks bool `protobuf:"varint,24,opt,name=autoTrimDisks,proto3" json:"autoTrimDisks,omitempty"` // 是否自动TRIM硬盘
MaxConcurrentReads int32 `protobuf:"varint,25,opt,name=maxConcurrentReads,proto3" json:"maxConcurrentReads,omitempty"` // 最大并发读
MaxConcurrentWrites int32 `protobuf:"varint,26,opt,name=maxConcurrentWrites,proto3" json:"maxConcurrentWrites,omitempty"` // 最大并发写
}
func (x *NodeCluster) Reset() {
@@ -243,12 +245,26 @@ func (x *NodeCluster) GetAutoTrimDisks() bool {
return false
}
func (x *NodeCluster) GetMaxConcurrentReads() int32 {
if x != nil {
return x.MaxConcurrentReads
}
return 0
}
func (x *NodeCluster) GetMaxConcurrentWrites() int32 {
if x != nil {
return x.MaxConcurrentWrites
}
return 0
}
var File_models_model_node_cluster_proto protoreflect.FileDescriptor
var file_models_model_node_cluster_proto_rawDesc = []byte{
0x0a, 0x1f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e,
0x6f, 0x64, 0x65, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x99, 0x06, 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c,
0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xfb, 0x06, 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c,
0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65,
@@ -298,8 +314,14 @@ var file_models_model_node_cluster_proto_rawDesc = []byte{
0x79, 0x73, 0x74, 0x65, 0x6d, 0x54, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x24, 0x0a, 0x0d, 0x61,
0x75, 0x74, 0x6f, 0x54, 0x72, 0x69, 0x6d, 0x44, 0x69, 0x73, 0x6b, 0x73, 0x18, 0x18, 0x20, 0x01,
0x28, 0x08, 0x52, 0x0d, 0x61, 0x75, 0x74, 0x6f, 0x54, 0x72, 0x69, 0x6d, 0x44, 0x69, 0x73, 0x6b,
0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
0x73, 0x12, 0x2e, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65,
0x6e, 0x74, 0x52, 0x65, 0x61, 0x64, 0x73, 0x18, 0x19, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x6d,
0x61, 0x78, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x61, 0x64,
0x73, 0x12, 0x30, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65,
0x6e, 0x74, 0x57, 0x72, 0x69, 0x74, 0x65, 0x73, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13,
0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x57, 0x72, 0x69,
0x74, 0x65, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (