mirror of
				https://github.com/TeaOSLab/EdgeCommon.git
				synced 2025-11-04 13:10:24 +08:00 
			
		
		
		
	可以在集群设置中修改节点最大并发读/写数
This commit is contained in:
		@@ -15791,7 +15791,7 @@
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      "name": "CreateNodeClusterRequest",
 | 
					      "name": "CreateNodeClusterRequest",
 | 
				
			||||||
      "code": "message CreateNodeClusterRequest {\n\tstring name = 1;\n\tint64 nodeGrantId = 2;\n\tstring installDir = 3;\n\tint64 dnsDomainId = 4;\n\tstring dnsName = 5;\n\tint32 dnsTTL = 9;\n\tint64 httpCachePolicyId = 6;\n\tint64 httpFirewallPolicyId = 7;\n\tbytes systemServicesJSON = 8; // 系统服务设置\n\tbytes globalServerConfigJSON = 10; // 服务全局设置\n\tbool autoInstallNftables = 11; // 自动安装nftables\n\tbool autoSystemTuning = 12; // 是否自动调节系统参数\n\tbool autoTrimDisks = 13; // 是否自动TRIM硬盘\n}",
 | 
					      "code": "message CreateNodeClusterRequest {\n\tstring name = 1;\n\tint64 nodeGrantId = 2;\n\tstring installDir = 3;\n\tint64 dnsDomainId = 4;\n\tstring dnsName = 5;\n\tint32 dnsTTL = 9;\n\tint64 httpCachePolicyId = 6;\n\tint64 httpFirewallPolicyId = 7;\n\tbytes systemServicesJSON = 8; // 系统服务设置\n\tbytes globalServerConfigJSON = 10; // 服务全局设置\n\tbool autoInstallNftables = 11; // 自动安装nftables\n\tbool autoSystemTuning = 12; // 是否自动调节系统参数\n\tbool autoTrimDisks = 13; // 是否自动TRIM硬盘\n\tint32 maxConcurrentReads = 15; // 最大并发读\n\tint32 maxConcurrentWrites = 16; // 最大并发写\n}",
 | 
				
			||||||
      "doc": "创建集群"
 | 
					      "doc": "创建集群"
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
@@ -21691,7 +21691,7 @@
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      "name": "NodeCluster",
 | 
					      "name": "NodeCluster",
 | 
				
			||||||
      "code": "message NodeCluster {\n\tint64 id = 1;\n\tstring name = 2;\n\tint64 createdAt = 3;\n\tint64 nodeGrantId = 4;\n\tstring installDir = 5;\n\tstring uniqueId = 6;\n\tstring secret = 7;\n\tstring dnsName = 8;\n\tint64 dnsDomainId = 9;\n\tstring dnsDefaultRoute = 22; // DNS默认线路\n\tint64 httpCachePolicyId = 10;\n\tint64 httpFirewallPolicyId = 11;\n\tbool isOn = 12;\n\tstring timeZone = 13;\n\tint32 nodeMaxThreads = 14;\n\tbool autoOpenPorts = 16;\n\tbool isPinned = 17;\n\tbytes clockJSON = 18;\n\tbool autoRemoteStart = 19;\n\tbool autoInstallNftables = 20;\n\tbytes sshParamsJSON = 21;\n\tbool autoSystemTuning = 23; // 是否自动调节系统参数\n\tbool autoTrimDisks = 24; // 是否自动TRIM硬盘\n}",
 | 
					      "code": "message NodeCluster {\n\tint64 id = 1;\n\tstring name = 2;\n\tint64 createdAt = 3;\n\tint64 nodeGrantId = 4;\n\tstring installDir = 5;\n\tstring uniqueId = 6;\n\tstring secret = 7;\n\tstring dnsName = 8;\n\tint64 dnsDomainId = 9;\n\tstring dnsDefaultRoute = 22; // DNS默认线路\n\tint64 httpCachePolicyId = 10;\n\tint64 httpFirewallPolicyId = 11;\n\tbool isOn = 12;\n\tstring timeZone = 13;\n\tint32 nodeMaxThreads = 14;\n\tbool autoOpenPorts = 16;\n\tbool isPinned = 17;\n\tbytes clockJSON = 18;\n\tbool autoRemoteStart = 19;\n\tbool autoInstallNftables = 20;\n\tbytes sshParamsJSON = 21;\n\tbool autoSystemTuning = 23; // 是否自动调节系统参数\n\tbool autoTrimDisks = 24; // 是否自动TRIM硬盘\n\tint32 maxConcurrentReads = 25; // 最大并发读\n\tint32 maxConcurrentWrites = 26; // 最大并发写\n}",
 | 
				
			||||||
      "doc": ""
 | 
					      "doc": ""
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
@@ -23091,7 +23091,7 @@
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      "name": "UpdateNodeClusterRequest",
 | 
					      "name": "UpdateNodeClusterRequest",
 | 
				
			||||||
      "code": "message UpdateNodeClusterRequest {\n\tint64 nodeClusterId = 1;\n\tstring name = 2;\n\tint64 nodeGrantId = 3;\n\tstring installDir = 4;\n\tstring timeZone = 5;\n\tint32 nodeMaxThreads = 6;\n\tbool autoOpenPorts = 8;\n\tbytes clockJSON = 9;\n\tbool autoRemoteStart = 10;\n\tbool autoInstallNftables = 11;\n\tbytes sshParamsJSON = 12;\n\tbool autoSystemTuning = 13; // 是否自动调节系统参数\n\tbool autoTrimDisks = 14; // 是否自动TRIM硬盘\n}",
 | 
					      "code": "message UpdateNodeClusterRequest {\n\tint64 nodeClusterId = 1;\n\tstring name = 2;\n\tint64 nodeGrantId = 3;\n\tstring installDir = 4;\n\tstring timeZone = 5;\n\tint32 nodeMaxThreads = 6;\n\tbool autoOpenPorts = 8;\n\tbytes clockJSON = 9;\n\tbool autoRemoteStart = 10;\n\tbool autoInstallNftables = 11;\n\tbytes sshParamsJSON = 12;\n\tbool autoSystemTuning = 13; // 是否自动调节系统参数\n\tbool autoTrimDisks = 14; // 是否自动TRIM硬盘\n\tint32 maxConcurrentReads = 15; // 最大并发读\n\tint32 maxConcurrentWrites = 16; // 最大并发写\n}",
 | 
				
			||||||
      "doc": "修改集群"
 | 
					      "doc": "修改集群"
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -91,6 +91,8 @@ type NodeConfig struct {
 | 
				
			|||||||
	AutoInstallNftables  bool                                    `yaml:"autoInstallNftables" json:"autoInstallNftables"` // 自动安装nftables
 | 
						AutoInstallNftables  bool                                    `yaml:"autoInstallNftables" json:"autoInstallNftables"` // 自动安装nftables
 | 
				
			||||||
	AutoSystemTuning     bool                                    `yaml:"autoSystemTuning" json:"autoSystemTuning"`       // 自动调整系统参数
 | 
						AutoSystemTuning     bool                                    `yaml:"autoSystemTuning" json:"autoSystemTuning"`       // 自动调整系统参数
 | 
				
			||||||
	AutoTrimDisks        bool                                    `yaml:"autoTrimDisks" json:"autoTrimDisks"`             // 自动执行TRIM
 | 
						AutoTrimDisks        bool                                    `yaml:"autoTrimDisks" json:"autoTrimDisks"`             // 自动执行TRIM
 | 
				
			||||||
 | 
						MaxConcurrentReads   int                                     `yaml:"maxConcurrentReads" json:"maxConcurrentReads"`   // 最大并发读
 | 
				
			||||||
 | 
						MaxConcurrentWrites  int                                     `yaml:"maxConcurrentWrites" json:"maxConcurrentWrites"` // 最大并发写
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// 指标
 | 
						// 指标
 | 
				
			||||||
	MetricItems []*serverconfigs.MetricItemConfig `yaml:"metricItems" json:"metricItems"`
 | 
						MetricItems []*serverconfigs.MetricItemConfig `yaml:"metricItems" json:"metricItems"`
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -46,8 +46,10 @@ type NodeCluster struct {
 | 
				
			|||||||
	AutoRemoteStart      bool   `protobuf:"varint,19,opt,name=autoRemoteStart,proto3" json:"autoRemoteStart,omitempty"`
 | 
						AutoRemoteStart      bool   `protobuf:"varint,19,opt,name=autoRemoteStart,proto3" json:"autoRemoteStart,omitempty"`
 | 
				
			||||||
	AutoInstallNftables  bool   `protobuf:"varint,20,opt,name=autoInstallNftables,proto3" json:"autoInstallNftables,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"`
 | 
						SshParamsJSON        []byte `protobuf:"bytes,21,opt,name=sshParamsJSON,proto3" json:"sshParamsJSON,omitempty"`
 | 
				
			||||||
	AutoSystemTuning     bool   `protobuf:"varint,23,opt,name=autoSystemTuning,proto3" json:"autoSystemTuning,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硬盘
 | 
						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() {
 | 
					func (x *NodeCluster) Reset() {
 | 
				
			||||||
@@ -243,12 +245,26 @@ func (x *NodeCluster) GetAutoTrimDisks() bool {
 | 
				
			|||||||
	return false
 | 
						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 protoreflect.FileDescriptor
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var file_models_model_node_cluster_proto_rawDesc = []byte{
 | 
					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,
 | 
						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, 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,
 | 
						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,
 | 
						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,
 | 
						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,
 | 
						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,
 | 
						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,
 | 
						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,
 | 
						0x73, 0x12, 0x2e, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65,
 | 
				
			||||||
	0x33,
 | 
						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 (
 | 
					var (
 | 
				
			||||||
 
 | 
				
			|||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -27,4 +27,6 @@ message NodeCluster {
 | 
				
			|||||||
	bytes sshParamsJSON = 21;
 | 
						bytes sshParamsJSON = 21;
 | 
				
			||||||
	bool autoSystemTuning = 23; // 是否自动调节系统参数
 | 
						bool autoSystemTuning = 23; // 是否自动调节系统参数
 | 
				
			||||||
	bool autoTrimDisks = 24; // 是否自动TRIM硬盘
 | 
						bool autoTrimDisks = 24; // 是否自动TRIM硬盘
 | 
				
			||||||
 | 
						int32 maxConcurrentReads = 25; // 最大并发读
 | 
				
			||||||
 | 
						int32 maxConcurrentWrites = 26; // 最大并发写
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -190,6 +190,8 @@ message CreateNodeClusterRequest {
 | 
				
			|||||||
	bool autoInstallNftables = 11; // 自动安装nftables
 | 
						bool autoInstallNftables = 11; // 自动安装nftables
 | 
				
			||||||
	bool autoSystemTuning = 12; // 是否自动调节系统参数
 | 
						bool autoSystemTuning = 12; // 是否自动调节系统参数
 | 
				
			||||||
	bool autoTrimDisks = 13; // 是否自动TRIM硬盘
 | 
						bool autoTrimDisks = 13; // 是否自动TRIM硬盘
 | 
				
			||||||
 | 
						int32 maxConcurrentReads = 15; // 最大并发读
 | 
				
			||||||
 | 
						int32 maxConcurrentWrites = 16; // 最大并发写
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
message CreateNodeClusterResponse {
 | 
					message CreateNodeClusterResponse {
 | 
				
			||||||
@@ -211,6 +213,8 @@ message UpdateNodeClusterRequest {
 | 
				
			|||||||
	bytes sshParamsJSON = 12;
 | 
						bytes sshParamsJSON = 12;
 | 
				
			||||||
	bool autoSystemTuning = 13; // 是否自动调节系统参数
 | 
						bool autoSystemTuning = 13; // 是否自动调节系统参数
 | 
				
			||||||
	bool autoTrimDisks = 14; // 是否自动TRIM硬盘
 | 
						bool autoTrimDisks = 14; // 是否自动TRIM硬盘
 | 
				
			||||||
 | 
						int32 maxConcurrentReads = 15; // 最大并发读
 | 
				
			||||||
 | 
						int32 maxConcurrentWrites = 16; // 最大并发写
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 删除集群
 | 
					// 删除集群
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user