mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
[MM-57106] Remove unused cluster settings (#26490)
This commit is contained in:
parent
2e96a3f1e7
commit
7337c384a8
@ -472,11 +472,7 @@
|
|||||||
"EnableGossipCompression": true,
|
"EnableGossipCompression": true,
|
||||||
"EnableExperimentalGossipEncryption": false,
|
"EnableExperimentalGossipEncryption": false,
|
||||||
"ReadOnlyConfig": true,
|
"ReadOnlyConfig": true,
|
||||||
"GossipPort": 8074,
|
"GossipPort": 8074
|
||||||
"StreamingPort": 8075,
|
|
||||||
"MaxIdleConns": 100,
|
|
||||||
"MaxIdleConnsPerHost": 128,
|
|
||||||
"IdleConnTimeoutMilliseconds": 90000
|
|
||||||
},
|
},
|
||||||
"MetricsSettings": {
|
"MetricsSettings": {
|
||||||
"Enable": false,
|
"Enable": false,
|
||||||
|
@ -556,10 +556,6 @@ const defaultServerConfig: AdminConfig = {
|
|||||||
EnableExperimentalGossipEncryption: false,
|
EnableExperimentalGossipEncryption: false,
|
||||||
ReadOnlyConfig: true,
|
ReadOnlyConfig: true,
|
||||||
GossipPort: 8074,
|
GossipPort: 8074,
|
||||||
StreamingPort: 8075,
|
|
||||||
MaxIdleConns: 100,
|
|
||||||
MaxIdleConnsPerHost: 128,
|
|
||||||
IdleConnTimeoutMilliseconds: 90000,
|
|
||||||
},
|
},
|
||||||
MetricsSettings: {
|
MetricsSettings: {
|
||||||
Enable: false,
|
Enable: false,
|
||||||
|
@ -33,7 +33,7 @@ func TestUpdateConfigRace(t *testing.T) {
|
|||||||
|
|
||||||
cfg := &model.Config{}
|
cfg := &model.Config{}
|
||||||
cfg.SetDefaults()
|
cfg.SetDefaults()
|
||||||
cfg.ClusterSettings.MaxIdleConns = model.NewInt(1)
|
cfg.ClusterSettings.GossipPort = model.NewInt(9999)
|
||||||
searchEngine := searchengine.NewBroker(cfg)
|
searchEngine := searchengine.NewBroker(cfg)
|
||||||
layer := searchlayer.NewSearchLayer(&testlib.TestStore{Store: store}, searchEngine, cfg)
|
layer := searchlayer.NewSearchLayer(&testlib.TestStore{Store: store}, searchEngine, cfg)
|
||||||
var wg sync.WaitGroup
|
var wg sync.WaitGroup
|
||||||
|
@ -19,7 +19,7 @@ type ClusterDiscovery struct {
|
|||||||
ClusterName string `json:"cluster_name"`
|
ClusterName string `json:"cluster_name"`
|
||||||
Hostname string `json:"hostname"`
|
Hostname string `json:"hostname"`
|
||||||
GossipPort int32 `json:"gossip_port"`
|
GossipPort int32 `json:"gossip_port"`
|
||||||
Port int32 `json:"port"`
|
Port int32 `json:"port"` // Deperacted: Port is unused. It's only kept for backwards compatibility.
|
||||||
CreateAt int64 `json:"create_at"`
|
CreateAt int64 `json:"create_at"`
|
||||||
LastPingAt int64 `json:"last_ping_at"`
|
LastPingAt int64 `json:"last_ping_at"`
|
||||||
}
|
}
|
||||||
|
@ -934,10 +934,6 @@ type ClusterSettings struct {
|
|||||||
EnableExperimentalGossipEncryption *bool `access:"environment_high_availability,write_restrictable,cloud_restrictable"`
|
EnableExperimentalGossipEncryption *bool `access:"environment_high_availability,write_restrictable,cloud_restrictable"`
|
||||||
ReadOnlyConfig *bool `access:"environment_high_availability,write_restrictable,cloud_restrictable"`
|
ReadOnlyConfig *bool `access:"environment_high_availability,write_restrictable,cloud_restrictable"`
|
||||||
GossipPort *int `access:"environment_high_availability,write_restrictable,cloud_restrictable"` // telemetry: none
|
GossipPort *int `access:"environment_high_availability,write_restrictable,cloud_restrictable"` // telemetry: none
|
||||||
StreamingPort *int `access:"environment_high_availability,write_restrictable,cloud_restrictable"` // telemetry: none
|
|
||||||
MaxIdleConns *int `access:"environment_high_availability,write_restrictable,cloud_restrictable"` // telemetry: none
|
|
||||||
MaxIdleConnsPerHost *int `access:"environment_high_availability,write_restrictable,cloud_restrictable"` // telemetry: none
|
|
||||||
IdleConnTimeoutMilliseconds *int `access:"environment_high_availability,write_restrictable,cloud_restrictable"` // telemetry: none
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *ClusterSettings) SetDefaults() {
|
func (s *ClusterSettings) SetDefaults() {
|
||||||
@ -984,22 +980,6 @@ func (s *ClusterSettings) SetDefaults() {
|
|||||||
if s.GossipPort == nil {
|
if s.GossipPort == nil {
|
||||||
s.GossipPort = NewInt(8074)
|
s.GossipPort = NewInt(8074)
|
||||||
}
|
}
|
||||||
|
|
||||||
if s.StreamingPort == nil {
|
|
||||||
s.StreamingPort = NewInt(8075)
|
|
||||||
}
|
|
||||||
|
|
||||||
if s.MaxIdleConns == nil {
|
|
||||||
s.MaxIdleConns = NewInt(100)
|
|
||||||
}
|
|
||||||
|
|
||||||
if s.MaxIdleConnsPerHost == nil {
|
|
||||||
s.MaxIdleConnsPerHost = NewInt(128)
|
|
||||||
}
|
|
||||||
|
|
||||||
if s.IdleConnTimeoutMilliseconds == nil {
|
|
||||||
s.IdleConnTimeoutMilliseconds = NewInt(90000)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type MetricsSettings struct {
|
type MetricsSettings struct {
|
||||||
|
@ -167,7 +167,7 @@
|
|||||||
"EmailNotificationContentsType": "full",
|
"EmailNotificationContentsType": "full",
|
||||||
"LoginButtonColor": "",
|
"LoginButtonColor": "",
|
||||||
"LoginButtonBorderColor": "",
|
"LoginButtonBorderColor": "",
|
||||||
"LoginButtonTextColor": "",
|
"LoginButtonTextColor": ""
|
||||||
},
|
},
|
||||||
"RateLimitSettings": {
|
"RateLimitSettings": {
|
||||||
"Enable": false,
|
"Enable": false,
|
||||||
@ -307,11 +307,7 @@
|
|||||||
"UseIPAddress": true,
|
"UseIPAddress": true,
|
||||||
"UseExperimentalGossip": true,
|
"UseExperimentalGossip": true,
|
||||||
"ReadOnlyConfig": true,
|
"ReadOnlyConfig": true,
|
||||||
"GossipPort": 8074,
|
"GossipPort": 8074
|
||||||
"StreamingPort": 8075,
|
|
||||||
"MaxIdleConns": 100,
|
|
||||||
"MaxIdleConnsPerHost": 128,
|
|
||||||
"IdleConnTimeoutMilliseconds": 90000
|
|
||||||
},
|
},
|
||||||
"MetricsSettings": {
|
"MetricsSettings": {
|
||||||
"Enable": false,
|
"Enable": false,
|
||||||
|
@ -226,29 +226,6 @@ exports[`components/ClusterSettings should match snapshot, compression disabled
|
|||||||
setByEnv={false}
|
setByEnv={false}
|
||||||
value={8074}
|
value={8074}
|
||||||
/>
|
/>
|
||||||
<AdminTextSetting
|
|
||||||
helpText={
|
|
||||||
<Memo(MemoizedFormattedMessage)
|
|
||||||
defaultMessage="The port used for streaming data between servers."
|
|
||||||
id="admin.cluster.StreamingPortDesc"
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
id="StreamingPort"
|
|
||||||
label={
|
|
||||||
<Memo(MemoizedFormattedMessage)
|
|
||||||
defaultMessage="Streaming Port:"
|
|
||||||
id="admin.cluster.StreamingPort"
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
onChange={[Function]}
|
|
||||||
placeholder={
|
|
||||||
Object {
|
|
||||||
"defaultMessage": "E.g.: \\"8075\\"",
|
|
||||||
"id": "admin.cluster.StreamingPortEx",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
setByEnv={false}
|
|
||||||
/>
|
|
||||||
</Memo(SettingsGroup)>
|
</Memo(SettingsGroup)>
|
||||||
<div
|
<div
|
||||||
className="admin-console-save"
|
className="admin-console-save"
|
||||||
@ -519,29 +496,6 @@ exports[`components/ClusterSettings should match snapshot, compression enabled 1
|
|||||||
setByEnv={false}
|
setByEnv={false}
|
||||||
value={8074}
|
value={8074}
|
||||||
/>
|
/>
|
||||||
<AdminTextSetting
|
|
||||||
helpText={
|
|
||||||
<Memo(MemoizedFormattedMessage)
|
|
||||||
defaultMessage="The port used for streaming data between servers."
|
|
||||||
id="admin.cluster.StreamingPortDesc"
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
id="StreamingPort"
|
|
||||||
label={
|
|
||||||
<Memo(MemoizedFormattedMessage)
|
|
||||||
defaultMessage="Streaming Port:"
|
|
||||||
id="admin.cluster.StreamingPort"
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
onChange={[Function]}
|
|
||||||
placeholder={
|
|
||||||
Object {
|
|
||||||
"defaultMessage": "E.g.: \\"8075\\"",
|
|
||||||
"id": "admin.cluster.StreamingPortEx",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
setByEnv={false}
|
|
||||||
/>
|
|
||||||
</Memo(SettingsGroup)>
|
</Memo(SettingsGroup)>
|
||||||
<div
|
<div
|
||||||
className="admin-console-save"
|
className="admin-console-save"
|
||||||
@ -812,29 +766,6 @@ exports[`components/ClusterSettings should match snapshot, encryption disabled 1
|
|||||||
setByEnv={false}
|
setByEnv={false}
|
||||||
value={8074}
|
value={8074}
|
||||||
/>
|
/>
|
||||||
<AdminTextSetting
|
|
||||||
helpText={
|
|
||||||
<Memo(MemoizedFormattedMessage)
|
|
||||||
defaultMessage="The port used for streaming data between servers."
|
|
||||||
id="admin.cluster.StreamingPortDesc"
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
id="StreamingPort"
|
|
||||||
label={
|
|
||||||
<Memo(MemoizedFormattedMessage)
|
|
||||||
defaultMessage="Streaming Port:"
|
|
||||||
id="admin.cluster.StreamingPort"
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
onChange={[Function]}
|
|
||||||
placeholder={
|
|
||||||
Object {
|
|
||||||
"defaultMessage": "E.g.: \\"8075\\"",
|
|
||||||
"id": "admin.cluster.StreamingPortEx",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
setByEnv={false}
|
|
||||||
/>
|
|
||||||
</Memo(SettingsGroup)>
|
</Memo(SettingsGroup)>
|
||||||
<div
|
<div
|
||||||
className="admin-console-save"
|
className="admin-console-save"
|
||||||
@ -1105,29 +1036,6 @@ exports[`components/ClusterSettings should match snapshot, encryption enabled 1`
|
|||||||
setByEnv={false}
|
setByEnv={false}
|
||||||
value={8074}
|
value={8074}
|
||||||
/>
|
/>
|
||||||
<AdminTextSetting
|
|
||||||
helpText={
|
|
||||||
<Memo(MemoizedFormattedMessage)
|
|
||||||
defaultMessage="The port used for streaming data between servers."
|
|
||||||
id="admin.cluster.StreamingPortDesc"
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
id="StreamingPort"
|
|
||||||
label={
|
|
||||||
<Memo(MemoizedFormattedMessage)
|
|
||||||
defaultMessage="Streaming Port:"
|
|
||||||
id="admin.cluster.StreamingPort"
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
onChange={[Function]}
|
|
||||||
placeholder={
|
|
||||||
Object {
|
|
||||||
"defaultMessage": "E.g.: \\"8075\\"",
|
|
||||||
"id": "admin.cluster.StreamingPortEx",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
setByEnv={false}
|
|
||||||
/>
|
|
||||||
</Memo(SettingsGroup)>
|
</Memo(SettingsGroup)>
|
||||||
<div
|
<div
|
||||||
className="admin-console-save"
|
className="admin-console-save"
|
||||||
|
@ -32,7 +32,6 @@ type State = {
|
|||||||
EnableExperimentalGossipEncryption: boolean;
|
EnableExperimentalGossipEncryption: boolean;
|
||||||
EnableGossipCompression: boolean;
|
EnableGossipCompression: boolean;
|
||||||
GossipPort: number;
|
GossipPort: number;
|
||||||
StreamingPort: number;
|
|
||||||
showWarning: boolean;
|
showWarning: boolean;
|
||||||
} & BaseState;
|
} & BaseState;
|
||||||
|
|
||||||
@ -53,8 +52,6 @@ const messages = defineMessages({
|
|||||||
enableGossipCompressionDesc: {id: 'admin.cluster.EnableGossipCompressionDesc', defaultMessage: 'When true, all communication through the gossip protocol will be compressed. It is recommended to keep this flag disabled.'},
|
enableGossipCompressionDesc: {id: 'admin.cluster.EnableGossipCompressionDesc', defaultMessage: 'When true, all communication through the gossip protocol will be compressed. It is recommended to keep this flag disabled.'},
|
||||||
gossipPort: {id: 'admin.cluster.GossipPort', defaultMessage: 'Gossip Port:'},
|
gossipPort: {id: 'admin.cluster.GossipPort', defaultMessage: 'Gossip Port:'},
|
||||||
gossipPortDesc: {id: 'admin.cluster.GossipPortDesc', defaultMessage: 'The port used for the gossip protocol. Both UDP and TCP should be allowed on this port.'},
|
gossipPortDesc: {id: 'admin.cluster.GossipPortDesc', defaultMessage: 'The port used for the gossip protocol. Both UDP and TCP should be allowed on this port.'},
|
||||||
streamingPort: {id: 'admin.cluster.StreamingPort', defaultMessage: 'Streaming Port:'},
|
|
||||||
streamingPortDesc: {id: 'admin.cluster.StreamingPortDesc', defaultMessage: 'The port used for streaming data between servers.'},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export const searchableStrings = [
|
export const searchableStrings = [
|
||||||
@ -74,8 +71,6 @@ export const searchableStrings = [
|
|||||||
messages.enableGossipCompressionDesc,
|
messages.enableGossipCompressionDesc,
|
||||||
messages.gossipPort,
|
messages.gossipPort,
|
||||||
messages.gossipPortDesc,
|
messages.gossipPortDesc,
|
||||||
messages.streamingPort,
|
|
||||||
messages.streamingPortDesc,
|
|
||||||
];
|
];
|
||||||
|
|
||||||
export default class ClusterSettings extends AdminSettings<Props, State> {
|
export default class ClusterSettings extends AdminSettings<Props, State> {
|
||||||
@ -87,7 +82,6 @@ export default class ClusterSettings extends AdminSettings<Props, State> {
|
|||||||
config.ClusterSettings.EnableExperimentalGossipEncryption = this.state.EnableExperimentalGossipEncryption;
|
config.ClusterSettings.EnableExperimentalGossipEncryption = this.state.EnableExperimentalGossipEncryption;
|
||||||
config.ClusterSettings.EnableGossipCompression = this.state.EnableGossipCompression;
|
config.ClusterSettings.EnableGossipCompression = this.state.EnableGossipCompression;
|
||||||
config.ClusterSettings.GossipPort = this.parseIntNonZero(this.state.GossipPort, 8074);
|
config.ClusterSettings.GossipPort = this.parseIntNonZero(this.state.GossipPort, 8074);
|
||||||
config.ClusterSettings.StreamingPort = this.parseIntNonZero(this.state.StreamingPort, 8075);
|
|
||||||
return config;
|
return config;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -102,7 +96,6 @@ export default class ClusterSettings extends AdminSettings<Props, State> {
|
|||||||
EnableExperimentalGossipEncryption: settings.EnableExperimentalGossipEncryption,
|
EnableExperimentalGossipEncryption: settings.EnableExperimentalGossipEncryption,
|
||||||
EnableGossipCompression: settings.EnableGossipCompression,
|
EnableGossipCompression: settings.EnableGossipCompression,
|
||||||
GossipPort: settings.GossipPort,
|
GossipPort: settings.GossipPort,
|
||||||
StreamingPort: settings.StreamingPort,
|
|
||||||
showWarning: false,
|
showWarning: false,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -275,16 +268,6 @@ export default class ClusterSettings extends AdminSettings<Props, State> {
|
|||||||
setByEnv={this.isSetByEnv('ClusterSettings.GossipPort')}
|
setByEnv={this.isSetByEnv('ClusterSettings.GossipPort')}
|
||||||
disabled={this.props.isDisabled}
|
disabled={this.props.isDisabled}
|
||||||
/>
|
/>
|
||||||
<TextSetting
|
|
||||||
id='StreamingPort'
|
|
||||||
label={<FormattedMessage {...messages.streamingPort}/>}
|
|
||||||
placeholder={defineMessage({id: 'admin.cluster.StreamingPortEx', defaultMessage: 'E.g.: "8075"'})}
|
|
||||||
helpText={<FormattedMessage {...messages.streamingPortDesc}/>}
|
|
||||||
value={this.state.StreamingPort}
|
|
||||||
onChange={this.overrideHandleChange}
|
|
||||||
setByEnv={this.isSetByEnv('ClusterSettings.StreamingPort')}
|
|
||||||
disabled={this.props.isDisabled}
|
|
||||||
/>
|
|
||||||
</SettingsGroup>
|
</SettingsGroup>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -598,9 +598,6 @@
|
|||||||
"admin.cluster.status_table.status": "Status",
|
"admin.cluster.status_table.status": "Status",
|
||||||
"admin.cluster.status_table.url": "Gossip Address",
|
"admin.cluster.status_table.url": "Gossip Address",
|
||||||
"admin.cluster.status_table.version": "Version",
|
"admin.cluster.status_table.version": "Version",
|
||||||
"admin.cluster.StreamingPort": "Streaming Port:",
|
|
||||||
"admin.cluster.StreamingPortDesc": "The port used for streaming data between servers.",
|
|
||||||
"admin.cluster.StreamingPortEx": "E.g.: \"8075\"",
|
|
||||||
"admin.cluster.unknown": "unknown",
|
"admin.cluster.unknown": "unknown",
|
||||||
"admin.cluster.UseIPAddress": "Use IP Address:",
|
"admin.cluster.UseIPAddress": "Use IP Address:",
|
||||||
"admin.cluster.UseIPAddressDesc": "When true, the cluster will attempt to communicate via IP Address vs using the hostname.",
|
"admin.cluster.UseIPAddressDesc": "When true, the cluster will attempt to communicate via IP Address vs using the hostname.",
|
||||||
|
@ -763,10 +763,6 @@ export type ClusterSettings = {
|
|||||||
EnableExperimentalGossipEncryption: boolean;
|
EnableExperimentalGossipEncryption: boolean;
|
||||||
ReadOnlyConfig: boolean;
|
ReadOnlyConfig: boolean;
|
||||||
GossipPort: number;
|
GossipPort: number;
|
||||||
StreamingPort: number;
|
|
||||||
MaxIdleConns: number;
|
|
||||||
MaxIdleConnsPerHost: number;
|
|
||||||
IdleConnTimeoutMilliseconds: number;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export type MetricsSettings = {
|
export type MetricsSettings = {
|
||||||
|
Loading…
Reference in New Issue
Block a user