大家周末愉快啊,今天分享一則重要通知,
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開發手冊(嵩山版)》最新發布,速速下載!
覺得不錯,別忘了隨手點贊+轉發哦!
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/16165.html
標籤:Java
上一篇:java:初始化塊和構造方法
