[MM-57106] Remove unused cluster settings (#26490)

This commit is contained in:
Ben Schumacher 2024-03-22 10:44:38 +01:00 committed by GitHub
parent 2e96a3f1e7
commit 7337c384a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 5 additions and 153 deletions

View File

@ -472,11 +472,7 @@
"EnableGossipCompression": true,
"EnableExperimentalGossipEncryption": false,
"ReadOnlyConfig": true,
"GossipPort": 8074,
"StreamingPort": 8075,
"MaxIdleConns": 100,
"MaxIdleConnsPerHost": 128,
"IdleConnTimeoutMilliseconds": 90000
"GossipPort": 8074
},
"MetricsSettings": {
"Enable": false,

View File

@ -556,10 +556,6 @@ const defaultServerConfig: AdminConfig = {
EnableExperimentalGossipEncryption: false,
ReadOnlyConfig: true,
GossipPort: 8074,
StreamingPort: 8075,
MaxIdleConns: 100,
MaxIdleConnsPerHost: 128,
IdleConnTimeoutMilliseconds: 90000,
},
MetricsSettings: {
Enable: false,

View File

@ -33,7 +33,7 @@ func TestUpdateConfigRace(t *testing.T) {
cfg := &model.Config{}
cfg.SetDefaults()
cfg.ClusterSettings.MaxIdleConns = model.NewInt(1)
cfg.ClusterSettings.GossipPort = model.NewInt(9999)
searchEngine := searchengine.NewBroker(cfg)
layer := searchlayer.NewSearchLayer(&testlib.TestStore{Store: store}, searchEngine, cfg)
var wg sync.WaitGroup

View File

@ -19,7 +19,7 @@ type ClusterDiscovery struct {
ClusterName string `json:"cluster_name"`
Hostname string `json:"hostname"`
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"`
LastPingAt int64 `json:"last_ping_at"`
}

View File

@ -934,10 +934,6 @@ type ClusterSettings struct {
EnableExperimentalGossipEncryption *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
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() {
@ -984,22 +980,6 @@ func (s *ClusterSettings) SetDefaults() {
if s.GossipPort == nil {
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 {

View File

@ -167,7 +167,7 @@
"EmailNotificationContentsType": "full",
"LoginButtonColor": "",
"LoginButtonBorderColor": "",
"LoginButtonTextColor": "",
"LoginButtonTextColor": ""
},
"RateLimitSettings": {
"Enable": false,
@ -307,11 +307,7 @@
"UseIPAddress": true,
"UseExperimentalGossip": true,
"ReadOnlyConfig": true,
"GossipPort": 8074,
"StreamingPort": 8075,
"MaxIdleConns": 100,
"MaxIdleConnsPerHost": 128,
"IdleConnTimeoutMilliseconds": 90000
"GossipPort": 8074
},
"MetricsSettings": {
"Enable": false,

View File

@ -226,29 +226,6 @@ exports[`components/ClusterSettings should match snapshot, compression disabled
setByEnv={false}
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)>
<div
className="admin-console-save"
@ -519,29 +496,6 @@ exports[`components/ClusterSettings should match snapshot, compression enabled 1
setByEnv={false}
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)>
<div
className="admin-console-save"
@ -812,29 +766,6 @@ exports[`components/ClusterSettings should match snapshot, encryption disabled 1
setByEnv={false}
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)>
<div
className="admin-console-save"
@ -1105,29 +1036,6 @@ exports[`components/ClusterSettings should match snapshot, encryption enabled 1`
setByEnv={false}
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)>
<div
className="admin-console-save"

View File

@ -32,7 +32,6 @@ type State = {
EnableExperimentalGossipEncryption: boolean;
EnableGossipCompression: boolean;
GossipPort: number;
StreamingPort: number;
showWarning: boolean;
} & 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.'},
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.'},
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 = [
@ -74,8 +71,6 @@ export const searchableStrings = [
messages.enableGossipCompressionDesc,
messages.gossipPort,
messages.gossipPortDesc,
messages.streamingPort,
messages.streamingPortDesc,
];
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.EnableGossipCompression = this.state.EnableGossipCompression;
config.ClusterSettings.GossipPort = this.parseIntNonZero(this.state.GossipPort, 8074);
config.ClusterSettings.StreamingPort = this.parseIntNonZero(this.state.StreamingPort, 8075);
return config;
};
@ -102,7 +96,6 @@ export default class ClusterSettings extends AdminSettings<Props, State> {
EnableExperimentalGossipEncryption: settings.EnableExperimentalGossipEncryption,
EnableGossipCompression: settings.EnableGossipCompression,
GossipPort: settings.GossipPort,
StreamingPort: settings.StreamingPort,
showWarning: false,
};
}
@ -275,16 +268,6 @@ export default class ClusterSettings extends AdminSettings<Props, State> {
setByEnv={this.isSetByEnv('ClusterSettings.GossipPort')}
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>
);
};

View File

@ -598,9 +598,6 @@
"admin.cluster.status_table.status": "Status",
"admin.cluster.status_table.url": "Gossip Address",
"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.UseIPAddress": "Use IP Address:",
"admin.cluster.UseIPAddressDesc": "When true, the cluster will attempt to communicate via IP Address vs using the hostname.",

View File

@ -763,10 +763,6 @@ export type ClusterSettings = {
EnableExperimentalGossipEncryption: boolean;
ReadOnlyConfig: boolean;
GossipPort: number;
StreamingPort: number;
MaxIdleConns: number;
MaxIdleConnsPerHost: number;
IdleConnTimeoutMilliseconds: number;
};
export type MetricsSettings = {