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開發手冊(嵩山版)》最新發布,速速下載!

覺得不錯,別忘了隨手點贊+轉發哦!


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM