MM-59934: Add Redis to CI and other improvements (#28164)
- Update library version. - Added MaxFlush delay to help reduce CPU usage. - Fall back to LRU cache for the caches which use SCAN. - Added mattermost-redis and running for all api layer tests in Postgres. https://mattermost.atlassian.net/browse/MM-59934 ```release-note NONE ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
02dfc2d205
Коммит
75ed2860ac
@@ -935,27 +935,32 @@ func (s *ServiceSettings) SetDefaults(isUpdate bool) {
|
||||
}
|
||||
|
||||
type CacheSettings struct {
|
||||
CacheType *string `access:",write_restrictable,cloud_restrictable"`
|
||||
RedisAddress *string `access:",write_restrictable,cloud_restrictable"` // telemetry: none
|
||||
RedisPassword *string `access:",write_restrictable,cloud_restrictable"` // telemetry: none
|
||||
RedisDB *int `access:",write_restrictable,cloud_restrictable"` // telemetry: none
|
||||
CacheType *string `access:",write_restrictable,cloud_restrictable"`
|
||||
RedisAddress *string `access:",write_restrictable,cloud_restrictable"` // telemetry: none
|
||||
RedisPassword *string `access:",write_restrictable,cloud_restrictable"` // telemetry: none
|
||||
RedisDB *int `access:",write_restrictable,cloud_restrictable"` // telemetry: none
|
||||
DisableClientCache *bool `access:",write_restrictable,cloud_restrictable"` // telemetry: none
|
||||
}
|
||||
|
||||
func (s *CacheSettings) SetDefaults() {
|
||||
if s.CacheType == nil {
|
||||
s.CacheType = NewString(CacheTypeLRU)
|
||||
s.CacheType = NewPointer(CacheTypeLRU)
|
||||
}
|
||||
|
||||
if s.RedisAddress == nil {
|
||||
s.RedisAddress = NewString("")
|
||||
s.RedisAddress = NewPointer("")
|
||||
}
|
||||
|
||||
if s.RedisPassword == nil {
|
||||
s.RedisPassword = NewString("")
|
||||
s.RedisPassword = NewPointer("")
|
||||
}
|
||||
|
||||
if s.RedisDB == nil {
|
||||
s.RedisDB = NewInt(-1)
|
||||
s.RedisDB = NewPointer(-1)
|
||||
}
|
||||
|
||||
if s.DisableClientCache == nil {
|
||||
s.DisableClientCache = NewPointer(false)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4507,6 +4512,10 @@ func (o *Config) Sanitize(pluginManifests []*Manifest) {
|
||||
*o.ServiceSettings.SplitKey = FakeSetting
|
||||
}
|
||||
|
||||
if o.CacheSettings.RedisPassword != nil {
|
||||
*o.CacheSettings.RedisPassword = FakeSetting
|
||||
}
|
||||
|
||||
o.PluginSettings.Sanitize(pluginManifests)
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user