Skip to content

Commit

Permalink
meta/redis:dont try set maxmemory_policy if setting does not exist (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
p1u3o authored Jul 13, 2023
1 parent 54b3081 commit edb40b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/meta/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -3548,7 +3548,7 @@ func (m *redisMeta) checkServerConfig() {
if err != nil {
logger.Warnf("parse info: %s", err)
}
if rInfo.storageProvider == "" && rInfo.maxMemoryPolicy != "noeviction" {
if rInfo.storageProvider == "" && rInfo.maxMemoryPolicy != "" && rInfo.maxMemoryPolicy != "noeviction" {
logger.Warnf("maxmemory_policy is %q, we will try to reconfigure it to 'noeviction'.", rInfo.maxMemoryPolicy)
if _, err := m.rdb.ConfigSet(Background, "maxmemory-policy", "noeviction").Result(); err != nil {
logger.Errorf("try to reconfigure maxmemory-policy to 'noeviction' failed: %s", err)
Expand Down

0 comments on commit edb40b8

Please sign in to comment.