Skip to content

Commit 2dba1e3

Browse files
authored
Merge 6.2 RC3
2 parents ec2d180 + 95338f9 commit 2dba1e3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+6051
-921
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,14 @@ jobs:
5858
run: |
5959
yum -y install gcc make
6060
make REDIS_CFLAGS='-Werror'
61+
62+
build-freebsd:
63+
runs-on: macos-latest
64+
steps:
65+
- uses: actions/checkout@v2
66+
- name: make
67+
uses: vmactions/[email protected]
68+
with:
69+
usesh: true
70+
prepare: pkg install -y gmake
71+
run: gmake

.github/workflows/daily.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,23 @@ jobs:
9999
./runtest-cluster --tls
100100
./runtest-cluster
101101
102+
test-ubuntu-io-threads:
103+
runs-on: ubuntu-latest
104+
if: github.repository == 'redis/redis'
105+
timeout-minutes: 14400
106+
steps:
107+
- uses: actions/checkout@v2
108+
- name: make
109+
run: |
110+
make
111+
- name: test
112+
run: |
113+
sudo apt-get install tcl8.5 tcl-tls
114+
./runtest --config io-threads 4 --config io-threads-do-reads yes --accurate --verbose --tags network
115+
- name: cluster tests
116+
run: |
117+
./runtest-cluster --config io-threads 4 --config io-threads-do-reads yes
118+
102119
test-valgrind:
103120
runs-on: ubuntu-latest
104121
if: github.repository == 'redis/redis'
@@ -186,3 +203,20 @@ jobs:
186203
- name: cluster tests
187204
run: ./runtest-cluster
188205

206+
test-freebsd:
207+
runs-on: macos-latest
208+
if: github.repository == 'redis/redis'
209+
timeout-minutes: 14400
210+
steps:
211+
- uses: actions/checkout@v2
212+
- name: test
213+
uses: vmactions/[email protected]
214+
with:
215+
usesh: true
216+
prepare: pkg install -y gmake lang/tcl85
217+
run: |
218+
gmake
219+
./runtest --accurate --verbose --no-latency
220+
MAKE=gmake ./runtest-moduleapi --verbose
221+
./runtest-sentinel
222+
./runtest-cluster

00-RELEASENOTES

Lines changed: 61 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,53 @@
1+
Redis 6.2 RC3 Released Tue Feb 1 14:00:00 IST 2021
2+
================================================================================
3+
4+
Upgrade urgency LOW: This is the third Release Candidate of Redis 6.2.
5+
6+
Here is a comprehensive list of changes in this release compared to 6.2 RC2,
7+
each one includes the PR number that added it, so you can get more details
8+
at https://github.com/redis/redis/pull/<number>
9+
10+
New commands / args:
11+
* Add HRANDFIELD and ZRANDMEMBER commands (#8297)
12+
* Add FAILOVER command (#8315)
13+
* Add GETEX, GETDEL commands (#8327)
14+
* Add PXAT/EXAT arguments to SET command (#8327)
15+
* Add SYNC arg to FLUSHALL and FLUSHDB, and ASYNC/SYNC arg to SCRIPT FLUSH (#8258)
16+
17+
Sentinel:
18+
* Add hostname support to Sentinel (#8282)
19+
* Prevent file descriptors from leaking into Sentinel scripts (#8242)
20+
* Fix config file line order dependency and config rewrite sequence (#8271)
21+
22+
New configuration options:
23+
* Add set-proc-title config option to disable changes to the process title (#3623)
24+
* Add proc-title-template option to control what's shown in the process title (#8397)
25+
* Add lazyfree-lazy-user-flush config option to control FLUSHALL, FLUSHDB and SCRIPT FLUSH (#8258)
26+
27+
Bug fixes:
28+
* AOF: recover from last write error by turning on/off appendonly config (#8030)
29+
* Exit on fsync error when the AOF fsync policy is 'always' (#8347)
30+
* Avoid assertions (on older kernels) when testing arm64 CoW bug (#8405)
31+
* CONFIG REWRITE should honor umask settings (#8371)
32+
* Fix firstkey,lastkey,step in COMMAND command for some commands (#8367)
33+
34+
Special considerations:
35+
* Fix misleading description of the save configuration directive (#8337)
36+
37+
Improvements:
38+
* A way to get RDB file via replication without excessive replication buffers (#8303)
39+
* Optimize performance of clusterGenNodesDescription for large clusters (#8182)
40+
41+
Info fields and introspection changes:
42+
* SLOWLOG and LATENCY monitor include unblocking time of blocked commands (#7491)
43+
44+
Modules:
45+
* Add modules API for streams (#8288)
46+
* Add event for fork child birth and termination (#8289)
47+
* Add RM_BlockedClientMeasureTime* etc, to track background processing in commandstats (#7491)
48+
* Fix bug in v6.2, wrong value passed to the new unlink callback (#8381)
49+
* Fix bug in v6.2, modules blocked on keys unblock on commands like LPUSH (#8356)
50+
151
================================================================================
252
Redis 6.2 RC2 Released Tue Jan 12 16:17:20 IST 2021
353
================================================================================
@@ -255,35 +305,39 @@ and we don't get reports of serious issues for a while.
255305
A special thank you for the amount of work put into this release by:
256306
- Oran Agra
257307
- Yossi Gottlieb
258-
- Itamar Haber
259-
- Guy Benoish
260308
- Filipe Oliveira
309+
- Viktor Söderqvist
310+
- Guy Benoish
311+
- Itamar Haber
312+
- Yang Bodong
261313
- Madelyn Olson
262314
- Wang Yuan
263315
- Felipe Machado
264-
- Yang Bodong
316+
- Wen Hui
265317
- Tatsuya Arisawa
266318
- Jonah H. Harris
319+
- Raghav Muddur
267320
- Jim Brunner
268321
- Yaacov Hazan
269-
- Wen Hui
322+
- Allen Farris
270323
- Chen Yang
271324
- Nitai Caro
272325
- Meir Shpilraien
273326
- maohuazhu
274327
- Valentino Geron
275-
- Qu Chen
328+
- Zhao Zhao
276329
- sundb
330+
- Qu Chen
277331
- George Prekas
278-
- Zhao Zhao
279332
- Tyson Andre
280333
- Michael Grunder
281334
- alexronke-channeladvisor
335+
- Andy Pan
282336
- Wu Yunlong
283337
- Wei Kukey
284338
- Yoav Steinberg
285-
- Uri Shachar
286339
- Greg Femec
340+
- Uri Shachar
287341
- Nykolas Laurentino de Lima
288342
- xhe
289343
- zhenwei pi

redis.conf

Lines changed: 45 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -325,31 +325,52 @@ databases 16
325325
# ASCII art logo in startup logs by setting the following option to yes.
326326
always-show-logo no
327327

328+
# By default, Redis modifies the process title (as seen in 'top' and 'ps') to
329+
# provide some runtime information. It is possible to disable this and leave
330+
# the process name as executed by setting the following to no.
331+
set-proc-title yes
332+
333+
# When changing the process title, Redis uses the following template to construct
334+
# the modified title.
335+
#
336+
# Template variables are specified in curly brackets. The following variables are
337+
# supported:
338+
#
339+
# {title} Name of process as executed if parent, or type of child process.
340+
# {listen-addr} Bind address or '*' followed by TCP or TLS port listening on, or
341+
# Unix socket if only that's available.
342+
# {server-mode} Special mode, i.e. "[sentinel]" or "[cluster]".
343+
# {port} TCP port listening on, or 0.
344+
# {tls-port} TLS port listening on, or 0.
345+
# {unixsocket} Unix domain socket listening on, or "".
346+
# {config-file} Name of configuration file used.
347+
#
348+
proc-title-template "{title} {listen-addr} {server-mode}"
349+
328350
################################ SNAPSHOTTING ################################
351+
352+
# Save the DB to disk.
329353
#
330-
# Save the DB on disk:
354+
# save <seconds> <changes>
331355
#
332-
# save <seconds> <changes>
356+
# Redis will save the DB if both the given number of seconds and the given
357+
# number of write operations against the DB occurred.
333358
#
334-
# Will save the DB if both the given number of seconds and the given
335-
# number of write operations against the DB occurred.
359+
# Snapshotting can be completely disabled with a single empty string argument
360+
# as in following example:
336361
#
337-
# In the example below the behavior will be to save:
338-
# after 900 sec (15 min) if at least 1 key changed
339-
# after 300 sec (5 min) if at least 10 keys changed
340-
# after 60 sec if at least 10000 keys changed
362+
# save ""
341363
#
342-
# Note: you can disable saving completely by commenting out all "save" lines.
364+
# Unless specified otherwise, by default Redis will save the DB:
365+
# * After 3600 seconds (an hour) if at least 1 key changed
366+
# * After 300 seconds (5 minutes) if at least 100 keys changed
367+
# * After 60 seconds if at least 10000 keys changed
343368
#
344-
# It is also possible to remove all the previously configured save
345-
# points by adding a save directive with a single empty string argument
346-
# like in the following example:
369+
# You can set these explicitly by uncommenting the three following lines.
347370
#
348-
# save ""
349-
350-
save 900 1
351-
save 300 10
352-
save 60 10000
371+
# save 3600 1
372+
# save 300 100
373+
# save 60 10000
353374

354375
# By default Redis will stop accepting writes if RDB snapshots are enabled
355376
# (at least one save point) and the latest background save failed.
@@ -1089,6 +1110,13 @@ replica-lazy-flush no
10891110

10901111
lazyfree-lazy-user-del no
10911112

1113+
# FLUSHDB, FLUSHALL, and SCRIPT FLUSH support both asynchronous and synchronous
1114+
# deletion, which can be controlled by passing the [SYNC|ASYNC] flags into the
1115+
# commands. When neither flag is passed, this directive will be used to determine
1116+
# if the data should be deleted asynchronously.
1117+
1118+
lazyfree-lazy-user-flush no
1119+
10921120
################################ THREADED I/O #################################
10931121

10941122
# Redis is mostly single threaded, however there are certain threaded

runtest-moduleapi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ $TCLSH tests/test_helper.tcl \
2323
--single unit/moduleapi/hooks \
2424
--single unit/moduleapi/misc \
2525
--single unit/moduleapi/blockonkeys \
26+
--single unit/moduleapi/blockonbackground \
2627
--single unit/moduleapi/scan \
2728
--single unit/moduleapi/datatype \
2829
--single unit/moduleapi/auth \
@@ -31,4 +32,5 @@ $TCLSH tests/test_helper.tcl \
3132
--single unit/moduleapi/getkeys \
3233
--single unit/moduleapi/test_lazyfree \
3334
--single unit/moduleapi/defrag \
35+
--single unit/moduleapi/stream \
3436
"${@}"

sentinel.conf

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,3 +321,21 @@ sentinel deny-scripts-reconfig yes
321321
# is possible to just rename a command to itself:
322322
#
323323
# SENTINEL rename-command mymaster CONFIG CONFIG
324+
325+
# HOSTNAMES SUPPORT
326+
#
327+
# Normally Sentinel uses only IP addresses and requires SENTINEL MONITOR
328+
# to specify an IP address. Also, it requires the Redis replica-announce-ip
329+
# keyword to specify only IP addresses.
330+
#
331+
# You may enable hostnames support by enabling resolve-hostnames. Note
332+
# that you must make sure your DNS is configured properly and that DNS
333+
# resolution does not introduce very long delays.
334+
#
335+
SENTINEL resolve-hostnames no
336+
337+
# When resolve-hostnames is enabled, Sentinel still uses IP addresses
338+
# when exposing instances to users, configuration files, etc. If you want
339+
# to retain the hostnames when announced, enable announce-hostnames below.
340+
#
341+
SENTINEL announce-hostnames no

src/acl.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,8 +1024,8 @@ int ACLSetUser(user *u, const char *op, ssize_t oplen) {
10241024

10251025
/* Return a description of the error that occurred in ACLSetUser() according to
10261026
* the errno value set by the function on error. */
1027-
char *ACLSetUserStringError(void) {
1028-
char *errmsg = "Wrong format";
1027+
const char *ACLSetUserStringError(void) {
1028+
const char *errmsg = "Wrong format";
10291029
if (errno == ENOENT)
10301030
errmsg = "Unknown command or category name in ACL";
10311031
else if (errno == EINVAL)
@@ -1454,7 +1454,7 @@ int ACLLoadConfiguredUsers(void) {
14541454
/* Load every rule defined for this user. */
14551455
for (int j = 1; aclrules[j]; j++) {
14561456
if (ACLSetUser(u,aclrules[j],sdslen(aclrules[j])) != C_OK) {
1457-
char *errmsg = ACLSetUserStringError();
1457+
const char *errmsg = ACLSetUserStringError();
14581458
serverLog(LL_WARNING,"Error loading ACL rule '%s' for "
14591459
"the user named '%s': %s",
14601460
aclrules[j],aclrules[0],errmsg);
@@ -1587,7 +1587,7 @@ sds ACLLoadFromFile(const char *filename) {
15871587
for (j = 2; j < argc; j++) {
15881588
argv[j] = sdstrim(argv[j],"\t\r\n");
15891589
if (ACLSetUser(fakeuser,argv[j],sdslen(argv[j])) != C_OK) {
1590-
char *errmsg = ACLSetUserStringError();
1590+
const char *errmsg = ACLSetUserStringError();
15911591
errors = sdscatprintf(errors,
15921592
"%s:%d: %s. ",
15931593
server.acl_filename, linenum, errmsg);
@@ -1908,7 +1908,7 @@ void aclCommand(client *c) {
19081908

19091909
for (int j = 3; j < c->argc; j++) {
19101910
if (ACLSetUser(tempu,c->argv[j]->ptr,sdslen(c->argv[j]->ptr)) != C_OK) {
1911-
char *errmsg = ACLSetUserStringError();
1911+
const char *errmsg = ACLSetUserStringError();
19121912
addReplyErrorFormat(c,
19131913
"Error in ACL SETUSER modifier '%s': %s",
19141914
(char*)c->argv[j]->ptr, errmsg);

src/ae.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
*/
3232

3333
#include "ae.h"
34+
#include "anet.h"
3435

3536
#include <stdio.h>
3637
#include <sys/time.h>

src/ae_epoll.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ static int aeApiCreate(aeEventLoop *eventLoop) {
5151
zfree(state);
5252
return -1;
5353
}
54+
anetCloexec(state->epfd);
5455
eventLoop->apidata = state;
5556
return 0;
5657
}

src/ae_evport.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ static int aeApiCreate(aeEventLoop *eventLoop) {
8282
zfree(state);
8383
return -1;
8484
}
85+
anetCloexec(state->portfd);
8586

8687
state->npending = 0;
8788

src/ae_kqueue.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ static int aeApiCreate(aeEventLoop *eventLoop) {
5353
zfree(state);
5454
return -1;
5555
}
56+
anetCloexec(state->kqfd);
5657
eventLoop->apidata = state;
5758
return 0;
5859
}

0 commit comments

Comments
 (0)