Redis 6.0.8 紧急发布,请尽快升级!

大家周末愉快啊,今天分享一则重要通知。

Redis 6.0.8 于 2020/9/10 日晚紧急发布!!!

可以看到这是一个紧急更新版本,使用了 Redis 6.0.7 Sentinel(哨兵)以及 CONFIG REWRITE 命令的用户受到影响,请尽快升级,参考问题:#7760。

https://github.com/redis/redis/issues/7760

Redis 6.0.8 发布邮件:

https://groups.google.com/g/redis-db/c/Wmf0RB25PmY/m/d7hVkerfBQAJ

以下是主要内容预览:

难道 Redis 出现了严重漏洞不成?栈长来解读一下这封邮件内容!

除了以上提到的受影响的内容之外,还有以下三方面的更新:

1、问题修复:

  • 通过 Redis 的 CONFIG SET 命令设置 oom-score-adj-values 参数值,或者通过在配置文件中加载的时候,将生成一个损坏的配置文件导致 Redis 启动失败;(好吧!不是漏洞,是 Redis 的一个 bug 而已!)
  • 修改 MacOS 系统下一个 redis-cli --pipe 使用问题;
  • 修复了当不存在的键时,使用 HKEYS/HVALS 命令的响应问题;
  • 其他各种小错误的修复;

2、新特性/改变

  • 移除设置 madvise 时的 THP 警告;
  • 允许在集群的只读副本上执行读取命令;
  • redis-cli --cluster 命令增加 masters/replicas 选项;

3、模块API

  • 增加 RedisModule_ThreadSafeContextTryLock 模块(线程安全的锁);

重点来看一下这个导致重大问题的 oom-score-adj-values 参数的用处:

https://github.com/redis/redis/pull/1690/files

############################ KERNEL OOM CONTROL ##############################

# On Linux, it is possible to hint the kernel OOM killer on what processes
# should be killed first when out of memory.
#
# Enabling this feature makes Redis actively control the oom_score_adj value
# for all its processes, depending on their role. The default scores will
# attempt to have background child processes killed before all others, and
# replicas killed before masters.

oom-score-adj no

# When oom-score-adj is used, this directive controls the specific values used
# for master, replica and background child processes. Values range -1000 to
# 1000 (higher means more likely to be killed).
#
# Unprivileged processes (not root, and without CAP_SYS_RESOURCE capabilities)
# can freely increase their value, but not decrease it below its initial
# settings.
#
# Values are used relative to the initial value of oom_score_adj when the server
# starts. Because typically the initial value is 0, they will often match the
# absolute values.

oom-score-adj-values 0 200 800

这个 oom-score-adj 参数是用来 Linux 内核控制调优的,在 Linux 系统中,当内存溢出时,可以提示内核 OOM killer 应该首先杀死哪些进程。

默认 oom-score-adj-values 不设置的情况下会优先杀死后台子进程,然后主从节点优先优先杀死从节点。

所以这 3 个值分别用来设置主、从、后台子进程的分值的,分值范围从 -1000 ~ 1000,分值越高越有可能被先杀死。

PS: 软件嘛,总避免不了bug,所以,各位开发、运维的同学,如果有用到这个的,请尽快升级保平安。

最后,欢迎大家关注微信公众号:Java技术栈,可以阅读栈长我写的往期 Redis 系列教程,后续更多干货陆续奉上。

觉得有用,欢迎在看、转发支持下,感谢了!

近期热文推荐:

1.免费获取 IntelliJ IDEA 激活码的 6 种方式!

2.我用 Java 8 写了一段逻辑,同事直呼看不懂,你试试看。。

3.吊打 Tomcat ,Undertow 性能很炸!!

4.国人开源了一款超好用的 Redis 客户端,真香!!

5.《Java开发手册(嵩山版)》最新发布,速速下载!

觉得不错,别忘了随手点赞+转发哦!

觉得不错,别忘了点赞+转发哦!

最后,关注下面的栈长的微信公众号:Java技术栈,回复:福利,可以免费获取一份我整理的 2020 最新 Java 面试题,真的非常全(含答案),无任何套路。

猜你喜欢

转载自blog.csdn.net/youanyyou/article/details/108547741