Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
512497d
Set default for INLINE_LSE_ATOMICS to 0 for compatibility across arch…
YaacovHazan May 14, 2026
e6eef89
Fix COMMAND GETKEYS for PFMERGE with no source keys (#14942)
melatron Mar 30, 2026
1be85ca
Fix HEXPIRE numfields overflow (#15021)
moticless Apr 13, 2026
6c6779f
Fix decrRefCount on NULL robj on corrupt KEY_META payload (#15034)
sundb Apr 16, 2026
4fef098
Fix wrong argv index in xinfoReplyWithStreamInfo for slot alloc size …
sundb Apr 14, 2026
651cf09
Fix use-after-free in RM_RegisterClusterMessageReceiver() (#15059)
darsheel-rathore Apr 23, 2026
35dc32a
tracking: fix self-overlap returning non-zero loop index (#15073)
rajkripal Apr 28, 2026
5b190f3
Fix signed integer overflow in scan count parameter (#14982)
vitahlin Apr 23, 2026
76d3d6e
Fix Sentinel config injection via SENTINEL SET (#14970)
hristostaykov-del May 5, 2026
482aff8
Fix vector set tests to use RESP2 for default clients (#15287)
vitahlin Jun 1, 2026
e00a300
Fix client output buffer memory tracking not accounting for copy-avoi…
sundb May 6, 2026
7607874
Fix diskless replicas drop during rdb pipe test (#15131)
vitahlin May 19, 2026
b7e268c
Add inline cleanup to sentinel CONFIG SET/GET tests (#15174)
hristostaykov-del May 8, 2026
75c85fa
Fix missing consumer propagation on empty XREADGROUP (#14963)
sggeorgiev Apr 8, 2026
99184b3
Fix sharded pubsub unsubscribe lookup using cached command slot (#15094)
ShubhamTaple Apr 29, 2026
99b9103
Fix incorrect memmove size in LDB breakpoint deletion (#15115)
0Linear May 10, 2026
8ee4d45
Fix MULTI queue memory accounting in multiStateMemOverhead (#15163)
YangboLong May 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
repository: ${{ env.GITHUB_REPOSITORY }}
ref: ${{ env.GITHUB_HEAD_REF }}
- name: make
run: make REDIS_CFLAGS='-Werror -DREDIS_TEST'
run: make REDIS_CFLAGS='-Werror -DREDIS_TEST -DDEBUG_ASSERTIONS'
- name: testprep
run: sudo apt-get install tcl8.6 tclx
- name: test
Expand Down
5 changes: 5 additions & 0 deletions modules/redisearch/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,10 @@ MODULE_VERSION = v8.6.8
MODULE_REPO = https://github.com/redisearch/redisearch
TARGET_MODULE = $(SRC_DIR)/bin/$(FULL_VARIANT)/search-community/redisearch.so

# Set INLINE_LSE_ATOMICS=1 for perf improvement on common ARM CPUs (i.e. Graviton2/3/4); no effect on x86 or macOS.
# Default 0 keeps the binary runnable on pre-Armv8.1-a cores (Cortex-A72, Graviton1, RPi4) that would otherwise SIGILL at module load.
INLINE_LSE_ATOMICS ?= 0
export INLINE_LSE_ATOMICS

include ../common.mk

4 changes: 2 additions & 2 deletions modules/vector-sets/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ def __init__(self, primary_port=6379, replica_port=6380):
self.error_details = None
self.test_key = f"test:{self.__class__.__name__.lower()}"
# Primary Redis instance
self.redis = redis.Redis(port=primary_port,db=9)
self.redis = redis.Redis(port=primary_port,protocol=2,db=9)
self.redis3 = redis.Redis(port=primary_port,protocol=3,db=9)
# Replica Redis instance
self.replica = redis.Redis(port=replica_port,db=9)
self.replica = redis.Redis(port=replica_port,protocol=2,db=9)
# Replication status
self.replication_setup = False
# Ports
Expand Down
2 changes: 1 addition & 1 deletion src/cluster_asm.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ size_t asmGetImportInputBufferSize(void) {
return 0;
}

size_t asmGetMigrateOutputBufferSize(void) {
size_t asmGetMigrateOutputMemoryUsage(void) {
if (!asmManager || listLength(asmManager->tasks) == 0) return 0;

asmTask *task = listNodeValue(listFirst(asmManager->tasks));
Expand Down
2 changes: 1 addition & 1 deletion src/cluster_asm.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct slotRangeArray *asmTaskGetSlotRanges(const char *task_id);
int asmNotifyConfigUpdated(struct asmTask *task, sds *err);
size_t asmGetPeakSyncBufferSize(void);
size_t asmGetImportInputBufferSize(void);
size_t asmGetMigrateOutputBufferSize(void);
size_t asmGetMigrateOutputMemoryUsage(void);
int clusterAsmCancel(const char *task_id, const char *reason);
int clusterAsmCancelBySlot(int slot, const char *reason);
int clusterAsmCancelBySlotRangeArray(struct slotRangeArray *slots, const char *reason);
Expand Down
2 changes: 1 addition & 1 deletion src/commands.def
Original file line number Diff line number Diff line change
Expand Up @@ -11830,7 +11830,7 @@ struct COMMAND_STRUCT redisCommandTable[] = {
{MAKE_CMD("pfadd","Adds elements to a HyperLogLog key. Creates the key if it doesn't exist.","O(1) to add every element.","2.8.9",CMD_DOC_NONE,NULL,NULL,"hyperloglog",COMMAND_GROUP_HYPERLOGLOG,PFADD_History,0,PFADD_Tips,0,pfaddCommand,-2,CMD_WRITE|CMD_DENYOOM|CMD_FAST,ACL_CATEGORY_HYPERLOGLOG,PFADD_Keyspecs,1,NULL,2),.args=PFADD_Args},
{MAKE_CMD("pfcount","Returns the approximated cardinality of the set(s) observed by the HyperLogLog key(s).","O(1) with a very small average constant time when called with a single key. O(N) with N being the number of keys, and much bigger constant times, when called with multiple keys.","2.8.9",CMD_DOC_NONE,NULL,NULL,"hyperloglog",COMMAND_GROUP_HYPERLOGLOG,PFCOUNT_History,0,PFCOUNT_Tips,0,pfcountCommand,-2,CMD_READONLY|CMD_MAY_REPLICATE,ACL_CATEGORY_HYPERLOGLOG,PFCOUNT_Keyspecs,1,NULL,1),.args=PFCOUNT_Args},
{MAKE_CMD("pfdebug","Internal commands for debugging HyperLogLog values.","N/A","2.8.9",CMD_DOC_SYSCMD,NULL,NULL,"hyperloglog",COMMAND_GROUP_HYPERLOGLOG,PFDEBUG_History,0,PFDEBUG_Tips,0,pfdebugCommand,3,CMD_WRITE|CMD_DENYOOM|CMD_ADMIN,ACL_CATEGORY_HYPERLOGLOG,PFDEBUG_Keyspecs,1,NULL,2),.args=PFDEBUG_Args},
{MAKE_CMD("pfmerge","Merges one or more HyperLogLog values into a single key.","O(N) to merge N HyperLogLogs, but with high constant times.","2.8.9",CMD_DOC_NONE,NULL,NULL,"hyperloglog",COMMAND_GROUP_HYPERLOGLOG,PFMERGE_History,0,PFMERGE_Tips,0,pfmergeCommand,-2,CMD_WRITE|CMD_DENYOOM,ACL_CATEGORY_HYPERLOGLOG,PFMERGE_Keyspecs,2,NULL,2),.args=PFMERGE_Args},
{MAKE_CMD("pfmerge","Merges one or more HyperLogLog values into a single key.","O(N) to merge N HyperLogLogs, but with high constant times.","2.8.9",CMD_DOC_NONE,NULL,NULL,"hyperloglog",COMMAND_GROUP_HYPERLOGLOG,PFMERGE_History,0,PFMERGE_Tips,0,pfmergeCommand,-2,CMD_WRITE|CMD_DENYOOM,ACL_CATEGORY_HYPERLOGLOG,PFMERGE_Keyspecs,2,pfmergeGetKeys,2),.args=PFMERGE_Args},
{MAKE_CMD("pfselftest","An internal command for testing HyperLogLog values.","N/A","2.8.9",CMD_DOC_SYSCMD,NULL,NULL,"hyperloglog",COMMAND_GROUP_HYPERLOGLOG,PFSELFTEST_History,0,PFSELFTEST_Tips,0,pfselftestCommand,1,CMD_ADMIN,ACL_CATEGORY_HYPERLOGLOG,PFSELFTEST_Keyspecs,0,NULL,0)},
/* list */
{MAKE_CMD("blmove","Pops an element from a list, pushes it to another list and returns it. Blocks until an element is available otherwise. Deletes the list if the last element was moved.","O(1)","6.2.0",CMD_DOC_NONE,NULL,NULL,"list",COMMAND_GROUP_LIST,BLMOVE_History,0,BLMOVE_Tips,0,blmoveCommand,6,CMD_WRITE|CMD_DENYOOM|CMD_BLOCKING,ACL_CATEGORY_LIST,BLMOVE_Keyspecs,2,NULL,5),.args=BLMOVE_Args},
Expand Down
6 changes: 6 additions & 0 deletions src/commands/memory-stats.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@
"clients.normal": {
"type": "integer"
},
"clients.normal.shared": {
"type": "integer"
},
"clients.normal.unshared": {
"type": "integer"
},
"cluster.links": {
"type": "integer"
},
Expand Down
1 change: 1 addition & 0 deletions src/commands/pfmerge.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"since": "2.8.9",
"arity": -2,
"function": "pfmergeCommand",
"get_keys_function": "pfmergeGetKeys",
"command_flags": [
"WRITE",
"DENYOOM"
Expand Down
25 changes: 24 additions & 1 deletion src/db.c
Original file line number Diff line number Diff line change
Expand Up @@ -1873,7 +1873,7 @@ void scanGenericCommand(client *c, robj *o, unsigned long long cursor) {
* COUNT, so if the hash table is in a pathological state (very
* sparsely populated) we avoid to block too much time at the cost
* of returning no or very few elements. */
long maxiterations = count*10;
long maxiterations = (count > LONG_MAX / 10) ? LONG_MAX : count * 10;

/* We pass scanData which have three pointers to the callback:
* 1. data.keys: the list to which it will add new elements;
Expand Down Expand Up @@ -3643,6 +3643,29 @@ int sortGetKeys(struct redisCommand *cmd, robj **argv, int argc, getKeysResult *
return result->numkeys;
}

int pfmergeGetKeys(struct redisCommand *cmd, robj **argv, int argc, getKeysResult *result) {
int i, numkeys;
keyReference *keys;
UNUSED(cmd);
UNUSED(argv);

numkeys = argc - 1; /* destkey + all sourcekeys */
keys = getKeysPrepareResult(result, numkeys);

/* destkey at argv[1] */
keys[0].pos = 1;
keys[0].flags = CMD_KEY_RW | CMD_KEY_ACCESS | CMD_KEY_INSERT;

/* sourcekeys at argv[2..argc-1], may be zero */
for (i = 2; i < argc; i++) {
keys[i - 1].pos = i;
keys[i - 1].flags = CMD_KEY_RO | CMD_KEY_ACCESS;
}

result->numkeys = numkeys;
return result->numkeys;
}

/* This command declares incomplete keys, so the flags are correctly set for this function */
int migrateGetKeys(struct redisCommand *cmd, robj **argv, int argc, getKeysResult *result) {
int i, j, num, first;
Expand Down
2 changes: 1 addition & 1 deletion src/eval.c
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@ int ldbDelBreakpoint(int line) {
for (j = 0; j < ldb.bpcount; j++) {
if (ldb.bp[j] == line) {
ldb.bpcount--;
memmove(ldb.bp+j,ldb.bp+j+1,ldb.bpcount-j);
memmove(ldb.bp+j,ldb.bp+j+1,(ldb.bpcount-j) * sizeof(int));
return 1;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/evict.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ size_t freeMemoryGetNotCountedMemory(void) {
/* The migrate client is like a replica, we also push DELs into it when
* evicting keys belonging to the migrating slot, so we don't count its
* output buffer to avoid eviction loop. */
overhead += asmGetMigrateOutputBufferSize();
overhead += asmGetMigrateOutputMemoryUsage();

if (server.aof_state != AOF_OFF) {
overhead += sdsAllocSize(server.aof_buf);
Expand Down
2 changes: 1 addition & 1 deletion src/keymeta.c
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ int rdbLoadSkipMetaIfAllowed(rio *rdb, char *cname, int flags) {
*
* Note: rdbLoadCheckModuleValue() reads opcodes until it finds RDB_MODULE_OPCODE_EOF,
* so it consumes the EOF marker as well. We don't need to read it separately. */
robj *dummy = rdbLoadCheckModuleValue(rdb, cname);
robj *dummy = rdbLoadCheckModuleValue(rdb, cname, 1);
if (dummy == NULL) {
serverLog(LL_WARNING, "Corrupted metadata value for class '%s'", cname);
return -1;
Expand Down
4 changes: 2 additions & 2 deletions src/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ void moduleReleaseTempClient(client *c) {
}
clearClientConnectionState(c);
listEmpty(c->reply);
c->reply_bytes = 0;
c->reply_bytes = c->reply_bytes_shared = c->reply_bytes_unshared = 0;
c->duration = 0;
resetClient(c, -1);
serverAssert(c->all_argv_len_sum == 0);
Expand Down Expand Up @@ -9492,7 +9492,7 @@ void RM_RegisterClusterMessageReceiver(RedisModuleCtx *ctx, uint8_t type, RedisM
if (prev)
prev->next = r->next;
else
clusterReceivers[type]->next = r->next;
clusterReceivers[type] = r->next; /* Update the head */
zfree(r);
}
return;
Expand Down
3 changes: 2 additions & 1 deletion src/multi.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,7 @@ size_t multiStateMemOverhead(client *c) {
/* Add watched keys overhead, Note: this doesn't take into account the watched keys themselves, because they aren't managed per-client. */
mem += listLength(c->watched_keys) * (sizeof(listNode) + sizeof(watchedKey));
/* Reserved memory for queued multi commands. */
mem += c->mstate.alloc_count * sizeof(pendingCommand);
mem += c->mstate.alloc_count * sizeof(pendingCommand*);
mem += c->mstate.count * sizeof(pendingCommand);
return mem;
}
Loading
Loading