MM-34125: Remove WebSocketDelay feature flag (#17441)

It has been soaked for enough time in community-daily
and also in community. Enabling it for all.

```release-note
TCP_NO_DELAY is disabled for websocket connections
to allow for higher throughput
```

https://mattermost.atlassian.net/browse/MM-34125
Этот коммит содержится в:
Agniva De Sarker
2021-04-20 10:10:22 +05:30
коммит произвёл GitHub
родитель a16fdb5001
Коммит 4295a1f556
2 изменённых файлов: 8 добавлений и 11 удалений

Просмотреть файл

@@ -71,8 +71,9 @@ func (a *App) NewWebConn(ws *websocket.Conn, session model.Session, t i18n.Trans
}) })
} }
if a.srv.Config().FeatureFlags.WebSocketDelay {
// Disable TCP_NO_DELAY for higher throughput // Disable TCP_NO_DELAY for higher throughput
// Unfortunately, it doesn't work for tls.Conn,
// and currently, the API doesn't expose the underlying TCP conn.
tcpConn, ok := ws.UnderlyingConn().(*net.TCPConn) tcpConn, ok := ws.UnderlyingConn().(*net.TCPConn)
if ok { if ok {
err := tcpConn.SetNoDelay(false) err := tcpConn.SetNoDelay(false)
@@ -80,7 +81,6 @@ func (a *App) NewWebConn(ws *websocket.Conn, session model.Session, t i18n.Trans
mlog.Warn("Error in setting NoDelay socket opts", mlog.Err(err)) mlog.Warn("Error in setting NoDelay socket opts", mlog.Err(err))
} }
} }
}
wc := &WebConn{ wc := &WebConn{
App: a, App: a,

Просмотреть файл

@@ -34,8 +34,6 @@ type FeatureFlags struct {
// Toggle on and off support for Files search // Toggle on and off support for Files search
FilesSearch bool FilesSearch bool
// Feature flag to control setting the TCP_NO_DELAY setting for websockets.
WebSocketDelay bool
// Control support for custom data retention policies // Control support for custom data retention policies
CustomDataRetentionEnabled bool CustomDataRetentionEnabled bool
@@ -52,7 +50,6 @@ func (f *FeatureFlags) SetDefaults() {
f.PluginIncidentManagement = "1.7.0" f.PluginIncidentManagement = "1.7.0"
f.PluginApps = "" f.PluginApps = ""
f.WebSocketDelay = false
f.CustomDataRetentionEnabled = false f.CustomDataRetentionEnabled = false
} }