Skip to content

MOD-16299 - NRANGE support multiple aggregations - #2079

Merged
TalBarYakar merged 13 commits into
masterfrom
tal.ba/feat/Nrange_multi_agg
Jul 2, 2026
Merged

TalBarYakar merged 13 commits into
masterfrom
tal.ba/feat/Nrange_multi_agg

Conversation

@TalBarYakar

@TalBarYakar TalBarYakar commented Jun 24, 2026 •

Copy link
Copy Markdown
Contributor

Note

Medium Risk
Changes NRANGE aggregation argv semantics and reply shape for multi-agg rows; core query/reply path is reworked but covered by broad new tests.

Overview
TS.NRANGE / TS.NREVRANGE with AGGREGATION now take one token per key (count must match numkeys), where each token can list multiple aggregators comma-separated (e.g. avg,max for key 0 and sum for key 1). All keys still share one bucketDuration. The old behavior of joining per-key aggregators into a single comma token is removed.

Parsing adds shared ParseAggSpec (also used by single-key AGGREGATION parsing) and builds a flat per-key aggregation class list. ReplySeriesNRange switches from per-key sample iterators to SeriesQuery / AbstractIterator chunks and emits one flat value vector per timestamp—width = sum of aggregators per key—with NaN filling every missing slot for a key at that bucket.

Flow tests cover mixed multi-agg, EMPTY, large key counts, validation errors, and an extra cluster CROSSSLOT case for same-shard different slots.

Reviewed by Cursor Bugbot for commit 4d891a8. Bugbot is set up for automated code reviews on this repo. Configure here.

@TalBarYakar TalBarYakar self-assigned this Jun 24, 2026
@TalBarYakar TalBarYakar changed the title Tal.ba/feat/nrange multi agg MOD-16299 - NRANGE support multiple aggregations Jun 24, 2026
Comment thread src/module.c Resolved
Comment thread tests/flow/test_ts_nrange.py Outdated
# the old comma-joined form is now an unknown aggregator token
with pytest.raises(redis.ResponseError, match="[Uu]nknown aggregation"):
# comma-joined token with bucket immediately after is a count mismatch (1 token for 3 keys)
with pytest.raises(redis.ResponseError, match="aggregat"):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weakened assertion: match="aggregat" no longer pins the error.

This was match="[Uu]nknown aggregation". The change itself was necessary (with multi-agg, min,max,avg is a valid 3-agg spec, so for 3 keys this input is now legitimately a count-mismatch, not an unknown type). But "aggregat" is a substring of both Unknown aggregation type and the number of aggregators must be equal to numkeys, so a regression that routed this input back to the unknown-type path would still pass.

Pin it to the count-mismatch message:

Suggested change
with pytest.raises(redis.ResponseError, match="aggregat"):
with pytest.raises(redis.ResponseError, match="number of aggregators"):

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread tests/flow/test_ts_nrange.py Outdated
e.skipOnCluster()
with e.getClusterConnectionIfNeeded() as r:
keys = _setup_distinct(r, '{rx_magerr}')[:2]
with pytest.raises(redis.ResponseError, match="aggregat"):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same loose match as the other error test: "aggregat" matches both Unknown aggregation type and the number of aggregators must be equal to numkeys. This test documents the count-mismatch (too-many-tokens) path, so a regression that wrongly emitted Unknown aggregation type here would still pass. Pin the message:

Suggested change
with pytest.raises(redis.ResponseError, match="aggregat"):
with pytest.raises(redis.ResponseError, match="number of aggregators"):

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread src/module.c
// Like TS.RANGE but over an explicit list of same-slot keys, returning results pivoted by
// timestamp: one row per distinct timestamp, NaN where a key has no sample. Each aggspec is
// comma-separated to request multiple aggregators for that key (e.g. "AVG,SUM"). The number of
// aggspecs must equal numkeys; all share a single bucketDuration.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Emergent limit worth documenting. Because the per-key specs are flattened into one comma token before parseRangeArguments, the global TS_AGG_TYPES_MAX (=16) cap in _parseAggregationArgs (query_language.c:379, count >= TS_AGG_TYPES_MAX -> "Too many aggregation types") now applies to the sum of aggregators across all keys, not per key.

So e.g. TS.NRANGE 9 k0..k8 - + AGGREGATION avg,max avg,max ... avg,max 10 (9 keys x 2 = 18) is rejected with "Too many aggregation types" even though every per-key spec is individually valid and tiny. Pre-PR this only triggered with 16+ keys. No crash (the cap is checked before writing the fixed-size buffer), but the error is surprising. Worth a note in this command doc and/or a clearer error mentioning the per-command total.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rewrite no longer flattens specs into one token — each per-key spec is resolved inline, so TS_AGG_TYPES_MAX applies per key, not as a sum. No global cross-key limit. Adding a note to the doc comment to make the per-key cap explicit.

return result


def test_nrange_multi_agg_mixed():

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage gap: no EMPTY + multi-agg test. The new multi-agg tests all run without the EMPTY option. With EMPTY, the aggregation iterator gap-fills buckets, and for a multi-agg key each filled bucket carries values_per_sample > 1 -- the exact path where row_width/key_row_offset and the per-slot value/NaN fill in ReplySeriesNRange could go wrong. The existing test_nrange_empty_matches is single-agg-per-key only. Consider adding an EMPTY + multi-agg-per-key case (mixed widths). (A COUNT + multi-agg case would be a smaller nice-to-have.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

@gabsow

gabsow commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Stale comment (not in the diff, flagging here): tests/flow/test_ts_nrange.py L262-281 states that "nrange wraps the aggregation chain in a SeriesSampleIterator (chunk -> per-sample adapter) whose GetNext treats a non-NULL chunk with zero samples as end-of-stream (sample_iterator.c)". This PR removes that wrapper -- TSDB_generic_nrange now calls SeriesQuery and ReplySeriesNRange reads EnrichedChunks directly, so the empty-chunk -> end-of-stream behavior now lives in ReplySeriesNRange itself (reply.c, num_samples == 0 => key_active = false), not in sample_iterator.c. The two *_all_nan_bucket_* tests stay valid and valuable; please update the rationale to point at the new code path.

Comment thread src/module.c Outdated
// offset math) keeps working unchanged. out_aggs_per_key (caller-allocated, length numKeys) is
// filled with the number of aggregators each key requested. Returns a malloc'd argv the caller
// frees (with *out_joined, the synthesized token), *out_argc set; or NULL when no rewrite applies.
// On a bad request it replies, sets *err, and returns NULL.
static RedisModuleString **nrange_splice_aggregators(RedisModuleCtx *ctx,

@AvivDavid23 AvivDavid23 Jun 25, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe im out of the loop, but can't we somehow use the function we already have for parsing in for the noraml range/mrange etc?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great point — the rewrite does exactly that. nrange_splice_aggregators is gone; we now validate and resolve per-key specs inline, then call parseRangeArguments directly with a pointer-rearranged tmpArgv (no new Redis strings). All bucket/flag parsing reuses the shared path.

Comment thread src/module.c Outdated
long long bucket;
if (firstAgg + i >= argc ||
RedisModule_StringToLongLong(argv[firstAgg + i], &bucket) == REDISMODULE_OK) {
RTS_ReplyGeneralError(ctx, "TSDB: the number of aggregators must be equal to numkeys");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This message may be a bit misleading with multiple aggregators per key.
Maybe "the number of AGGREGATION arguments"?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating to "AGGREGATION arguments" for clarity.

Comment thread src/module.c Resolved
Comment thread src/query_language.c Resolved

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 00b00b5e8253631c3f97ea6863c6fc435f0d255a. Configure here.

Comment thread src/module.c Resolved
Comment thread src/module.c Resolved

@gabsow gabsow left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review for multi-aggregation TS.NRANGE/TS.NREVRANGE.

Overall the change is solid — I found no memory-safety or correctness/crash bugs. The flat-row pivot, the per-key classOffset slicing, the EnrichedChunk k-way merge, and the malloc/free ownership (free key-0's classes, swap in allClasses, free once at cleanup) all check out. The empty-chunk "= end of stream" handling in ReplySeriesNRange matches the removed SeriesSampleIterator semantics, so it's not a regression.

The findings below are validation/consistency and cleanup items, ranked by impact:

  1. Trailing comma in a spec is silently accepted (multi-key path diverges from TS.RANGE).
  2. Embedded empty token (avg,,sum) gives a different error message than the single-key path.
  3. Altitude/reuse: the per-key spec tokenizer duplicates the one in query_language.c — the root cause of (1) and (2).
  4. Efficiency: key 0's spec is parsed twice and a throwaway tmpArgv/classes array is built each call.
  5. Efficiency: n * TS_AGG_TYPES_MAX over-allocation.
  6. Cleanup: duplicated error literal + repeated free; goto.
  7. Test cleanup: duplicate section banner (likely a merge artifact).

Items 1–3 are worth addressing together (a shared resolveAggSpec helper would close the validation gaps and remove the duplication); the rest are optional polish.


Generated by Claude Code

Comment thread src/module.c Outdated
goto cleanup;
}
classIdx++;
cursor = comma ? comma + 1 : specEnd;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Validation gap: a trailing comma in a per-key spec is silently accepted (diverges from TS.RANGE).

The tokenizer advances cursor = comma + 1; for a spec like avg, it consumes avg, sets cursor == specEnd, and the while (cursor < specEnd) loop exits without ever validating the empty trailing token. So TS.NRANGE 2 k1 k2 - + AGGREGATION avg, sum 60 is accepted (key 0 → one agg), whereas the shared parser used by TS.RANGE rejects avg, with TSDB: Empty aggregation type in list (query_language.c:374-377, 389-393).

Same root cause as the embedded-empty-token divergence below — both come from this loop not mirroring the shared parser's empty-token check.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a tokenLen == 0 guard before StringLenAggTypeToEnum so trailing and embedded empty tokens both return TSDB: Empty aggregation type in list, consistent with TS.RANGE.

Comment thread src/module.c Outdated
size_t tokenLen = comma ? (size_t)(comma - cursor) : (size_t)(specEnd - cursor);
int aggType = StringLenAggTypeToEnum(cursor, tokenLen);
if (aggType < 0 || aggType >= TS_AGG_TYPES_MAX) {
RTS_ReplyGeneralError(ctx, "TSDB: Unknown aggregation type");

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent error message vs the single-key path for an embedded empty token.

For a spec like avg,,sum, the empty middle token reaches StringLenAggTypeToEnum(cursor, 0) → TS_AGG_INVALID, so this replies TSDB: Unknown aggregation type. The shared parser used by TS.RANGE reports TSDB: Empty aggregation type in list for the identical malformed spec (query_language.c:374-377). The specLen == 0 guard above only catches a fully empty spec, not an embedded empty token, so the "match what the shared parser returns" comment only half-holds.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Comment thread src/module.c Outdated
}
size_t keyClassStart = classIdx;
const char *cursor = spec, *specEnd = spec + specLen;
while (cursor < specEnd) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Altitude / reuse: this per-key spec tokenizer duplicates the one in query_language.c.

The comma-split + StringLenAggTypeToEnum + TS_AGG_TYPES_MAX cap + GetAggClass resolution here (lines 672-693) is a second copy of the loop in _parseAggregationArgs / parseAggregationArgs (query_language.c:370-398, 472-479). The divergences flagged above (trailing comma, embedded empty token) are a direct consequence of the two copies drifting. Consider factoring a shared helper — e.g. resolveAggSpec(ctx, str, len, AggregationClass **out, size_t *count) — called by both paths; the NRANGE loop would then own only the per-key offset bookkeeping and stay in lock-step with TS.RANGE validation.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make a function that does it , and use it for all spots

Comment thread src/module.c
// no new Redis strings). parseRangeArguments sees key 0's spec as the agg type token
// and parses the shared bucketDuration/BUCKETTIMESTAMP/EMPTY/etc. correctly.
int newArgc = argc - (n - 1);
RedisModuleString **tmpArgv = malloc((size_t)newArgc * sizeof(*tmpArgv));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Efficiency / altitude: key 0's spec is parsed twice and a throwaway argv + classes array are built each call.

allClasses already resolves every key's spec, including key 0. The tmpArgv splice exists only so parseRangeArguments parses the shared bucketDuration/BUCKETTIMESTAMP/EMPTY/ALIGN; the classes it produces from key 0's spec are immediately freed and discarded (line 721). So key 0 is tokenized and GetAggClass'd twice, and a malloc/free of tmpArgv happens every call purely to reuse the parser. A parse entry point that resolves the shared range params with classes = NULL would avoid both the double parse and the synthesized argv (and remove the index-fragile splice arithmetic).


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only the first agg is being parsed twice , don't feel like real efficiency issue

Comment thread src/module.c Outdated
// Single pass: validate tokens, fill aggs_per_key, and resolve agg type names.
// Pre-allocate with the upper bound (n × TS_AGG_TYPES_MAX) to avoid a separate
// counting pass; actual size is classIdx at the end.
AggregationClass **allClasses = malloc((size_t)n * TS_AGG_TYPES_MAX * sizeof(*allClasses));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Over-allocation: n * TS_AGG_TYPES_MAX pointers up front.

The common case is one aggregator per key, so this allocates TS_AGG_TYPES_MAX× more than the true total (which is just the sum of comma-token counts, ≥ numKeys — and is exactly the classIdx you already accumulate). For wide multi-key queries (thousands of same-slot keys) this is an unnecessary transient spike, against the deliberately streaming footprint of ReplySeriesNRange. A small grown vector, or a cheap first pass that sizes to the real total, avoids it.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the alternative is looping through all the agg twice to detect the number
Don't feel like it worse it

Comment thread src/module.c Outdated
RedisModule_StringToLongLong(argv[firstAgg + keyIdx], &numericCheck) ==
REDISMODULE_OK) {
RTS_ReplyGeneralError(ctx,
"TSDB: the number of AGGREGATION arguments must be equal to numkeys");

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cleanup: duplicated error literal + repeated free(allClasses); goto cleanup;.

"TSDB: the number of AGGREGATION arguments must be equal to numkeys" appears twice (here and line 698), and the free(allClasses); goto cleanup; pair is repeated six times in this block. Hoisting the message to a static const char * and routing all early exits through a single labeled cleanup (e.g. hand allClasses to rangeArgs.aggregationArgs.classes early, or NULL it on success-handoff, so the unconditional free at cleanup: covers it) removes the repetition and the risk of a future edit missing one site.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hoisted allClasses to the function's top-level declarations (NULL-initialized) and added free(allClasses) to the cleanup label. All early exits now goto cleanup directly. Added allClasses = NULL after ownership is transferred to rangeArgs to prevent double-free.

Comment thread tests/flow/test_ts_nrange.py Outdated
@@ -401,6 +401,225 @@ def test_nrange_errors():
r.execute_command('TS.NRANGE', 1, '{rx_err}:nope', '-', '+')


# ---------------------------------------------------------------------------
# cluster: keys must share a slot -> cross-slot keys are rejected

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate section banner (likely a merge artifact).

This # cluster: keys must share a slot -> cross-slot keys are rejected banner is identical to the one at line 624, and here it sits directly above the new multi-agg (MOD-16299) section with no cluster test under it. Removing this orphaned copy keeps the section index accurate.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the orphaned banner — merge artifact confirmed.

@gabsow gabsow left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated code review (high-effort, recall-biased). 6 findings inline, ranked by severity.

Most important: a silent data-loss bug in ReplySeriesNRange — an empty-but-non-terminal chunk (e.g. TS.NREVRANGE over a compaction series with LATEST) is treated as end-of-stream and the key's remaining samples are dropped as NaN. The rest are a validation gap, a command-metadata (COMMAND DOCS) inconsistency, a dead branch with an error-message change, and two cleanup/altitude notes on the argv-splice path.

Iterator lifecycle, allocation bounds, ownership/free paths, COUNT semantics, reverse ordering, and Samples_value_at indexing were all checked and look correct.


Generated by Claude Code

Comment thread src/reply.c Outdated
if (active[i]) {
key_chunks[i] = iters[i]->GetNext(iters[i]);
chunk_pos[i] = 0;
key_active[i] = (key_chunks[i] != NULL && key_chunks[i]->samples.num_samples > 0);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty-but-non-terminal chunk silently drops a key's data. key_active[i] is latched off the first GetNext, and the advance logic below (lines 312–316) likewise treats a num_samples == 0 chunk as end-of-stream for that key. But a chunk iterator's GetNext can legitimately return a non-NULL chunk with num_samples == 0 and still have data on a later call.

Concrete repro: TS.NREVRANGE over a compaction series with LATEST (raw, no AGGREGATION). SeriesIteratorGetNextChunk jumps straight to _handle_latest on the first call (series_iterator.c:83) without advancing currentChunk; if the computed latest sample falls outside [min,max] (series_iterator.c:123 false) it returns iter->enrichedChunk with num_samples == 0, then sets latest = false so the next call returns the real samples. Here the key is marked inactive at init, active_count is not incremented, and all of that key's real samples are omitted — reported as NaN columns and never contributing a target timestamp.

The old ReplySeriesRange was robust to this: while ((chunk = iter->GetNext(iter))) skips empty chunks (they contribute 0 samples) and stops only on NULL. The fix is to only deactivate a key when GetNext returns NULL — for a non-NULL empty chunk, fetch again rather than latching the key off. This applies both here (init) and in the advance branch at lines 312–319.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed with a NextNonemptyChunk helper that loops GetNext until it gets a non-NULL non-empty chunk. Both the init loop and the advance branch now use it — a NULL return is the only end-of-stream signal. Matches the old single-key path's while ((chunk = iter->GetNext(iter))) behavior.

Comment thread src/module.c
}
aggs_per_key[keyIdx] = classIdx - keyClassStart;
}
if (firstAgg + n < argc && RMStringLenAggTypeToEnum(argv[firstAgg + n]) != TS_AGG_INVALID) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too-many-aggregators check has a gap when the (numkeys+1)-th token is a non-aggregator. This guard only inspects the single token at firstAgg + n. With e.g. TS.NRANGE 2 k1 k2 - + AGGREGATION avg sum 10 max, the per-key loop consumes avg and sum; the token at firstAgg + n is 10, which is numeric → TS_AGG_INVALID, so this check passes. The trailing max then leaks into tmpArgv and is handed to parseRangeArguments, producing a confusing downstream error rather than the intended "the number of AGGREGATION arguments must be equal to numkeys". This is the one validation seam where the count==numkeys rule isn't enforced directly. (Behavior matches the old splice code, so it's pre-existing, but worth tightening now that this path is being reworked.)


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The token at firstAgg + n (immediately after the N agg specs) is the only one we need to check — if it's an agg type, someone passed too many specs. Anything beyond the bucket duration is already handled by parseRangeArguments, so scanning further is unnecessary.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-checked against current head — this is still silently accepted, so it isn't caught by parseRangeArguments. Concrete repro (independently traced 3×):

TS.NRANGE 2 k1 k2 - + AGGREGATION avg sum 10 max

firstAgg=7, n=2, so the guard here checks argv[firstAgg+n] = argv[9] = 10 (the bucketDuration) → RMStringLenAggTypeToEnum("10") returns TS_AGG_INVALID, so the condition is false and the guard never fires. It structurally only looks at the slot right after the N specs (the bucketDuration), never at the token past it. The tmpArgv splice then carries max (argv[10]) into the rebuilt argv after 10, and _parseAggregationArgs reads only the fixed "sl" pair (avg,10) while every other option is located by keyword (RMUtil_ArgIndex) — nothing inspects the leftover max, and there's no unconsumed-argument check on the range path.

Net: the malformed command succeeds (AVG for k1, SUM for k2) with max silently dropped, instead of erroring with the count-mismatch. Same for two stray tokens (... 10 max min).

To close it you'd need a leftover-token check after the bucketDuration (or have parseRangeArguments reject unconsumed args on this path). Holding my approval on this one item — everything else from the review is addressed (the efficiency/altitude points I'm happy to leave as you decided).

Comment thread src/cmd_info/ts_info.c Outdated
{ .name = "aggregators", .type = REDISMODULE_ARG_TYPE_STRING },
{ .name = "aggregators",
.type = REDISMODULE_ARG_TYPE_STRING,
.flags = REDISMODULE_CMD_ARG_MULTIPLE },

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REDISMODULE_CMD_ARG_MULTIPLE on a positional STRING immediately followed by a mandatory positional bucketDuration (INTEGER) makes the generated command syntax ambiguous. Redis treats a trailing variadic positional as consuming all remaining tokens, so COMMAND DOCS / client argument-completion will mis-describe NRANGE — bucketDuration appears to be swallowed by aggregators. Every other MULTIPLE arg in this file is either the last sub-arg, terminated by {0}, or a token-introduced/optional block; none is a greedy variadic directly before a required positional.

Runtime behavior is unaffected (argv is parsed manually in TSDB_generic_nrange), so this is metadata/cosmetic only. Same issue at line 1166 for TS_NRANGE_ARGS.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed REDISMODULE_CMD_ARG_MULTIPLE from both aggregators entries. Since the count equals numkeys (dynamic), there's no way to express it statically — describing it as a single STRING matches how TS.RANGE represents its agg spec and avoids the greedy-variadic ambiguity. Runtime unaffected.

Comment thread src/query_language.c Outdated
if (agg < 0 || agg >= TS_AGG_TYPES_MAX) {
int count = ParseAggSpec(ctx, aggStr, aggStr_len, agg_types);
if (count <= 0) {
if (count == 0) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dead branch, and a silent error-message change. ParseAggSpec returns -1 on error or >= 1 on success — it can never return 0 (an empty token returns -1 with "Empty aggregation type in list"). So if (count == 0) is unreachable and this whole block reduces to if (count < 0) return TSDB_ERROR;.

Worth confirming the behavior change this introduces: an empty top-level AGGREGATION token used to report "Unknown aggregation type" via the old inline count == 0 path; it now reports "Empty aggregation type in list" from ParseAggSpec. If the old message was intended (or tested elsewhere), this is a regression.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kept <= 0 — ParseAggSpec can't return 0 today, but <= 0 is more defensive and removes the need to reason about the invariant at the call site. Removed the dead inner if (count == 0) branch and its now-unreachable error reply.

Comment thread src/module.c
memcpy(tmpArgv, argv, (size_t)(firstAgg + 1) * sizeof(*tmpArgv));
memcpy(tmpArgv + firstAgg + 1,
argv + firstAgg + n,
(size_t)(argc - firstAgg - n) * sizeof(*tmpArgv));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Altitude: the argv-splice couples NRANGE to parseRangeArguments' internal token-offset math. Building a temporary argv that drops keys 1..N-1's specs purely so parseRangeArguments sees exactly one agg token before bucketDuration — and then discarding the classes it computes (lines 707–708) — is fragile. Any future change to how parseRangeArguments locates the shared params (BUCKETTIMESTAMP / EMPTY / ALIGN / COUNT) will silently break NRANGE, with no compile-time signal. A more robust approach would parse the shared range params directly rather than round-tripping through a spliced argv whose aggregation result is thrown away.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed it's a fragile coupling. Fixing it properly needs a new parseRangeArguments entry point that skips aggregator resolution — touching shared code used by TS.RANGE/TS.MRANGE is out of scope here. Happy to track it as a follow-up.

Comment thread src/module.c
}

// Replace the single-key classes array from parseRangeArguments with the full flat array.
free(rangeArgs.aggregationArgs.classes);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Key 0's agg spec is parsed and resolved twice. allClasses already resolved key 0's spec via ParseAggSpec + GetAggClass (lines 671–681); parseRangeArguments(tmpArgv) then re-runs the same resolution for key 0 and allocates rangeArgs.aggregationArgs.classes, which is immediately freed here and overwritten by allClasses. The second resolution exists only as a side effect of shared-param parsing — wasted work and duplicated logic.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same root cause as the argv-splice concern above — key 0 is parsed twice because we use parseRangeArguments for shared-param parsing and discard its aggregation result. The fix is the same: a parseRangeArguments entry point that skips agg resolution. Deferring to the same follow-up.

gabsow commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Re-review of 3174161 (fix remarks)

Re-checked the review findings against the latest commit. 3 of 6 addressed, including the important one.

✅ Fixed

  • Silent data-loss in ReplySeriesNRange (High) — the new NextNonemptyChunk helper drains empty chunks and stops only on NULL, used at both init and the advance branch with key_active[i] = (key_chunks[i] != NULL). The reverse+LATEST empty-first-chunk case now drains correctly. 👍
  • ts_info.c command metadata — REDISMODULE_CMD_ARG_MULTIPLE reverted, removing the ambiguous COMMAND DOCS syntax.
  • query_language.c dead branch — the unreachable count == 0 branch removed.

◻️ Still open (all in src/module.c, all low-severity — fine to defer/decline)

  • module.c:684 — too-many-aggregators check is bypassed when the (numkeys+1)-th token is numeric (e.g. ... AGGREGATION avg sum 10 max), yielding a confusing downstream error instead of the count-mismatch message. Quick guard tighten if you want it.
  • module.c:695–708 — altitude note: the temp-argv splice couples NRANGE to parseRangeArguments' token-offset internals.
  • module.c:707 — key 0's agg spec is resolved twice (the parseRangeArguments result is discarded).

The core correctness bug is resolved; the remaining three are minor.


Generated by Claude Code

@TalBarYakar
TalBarYakar requested a review from gabsow July 2, 2026 06:05
@gabsow

gabsow commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the re-request @TalBarYakar — but I don't see a new commit since the last round (head is still 317416149), so the one open item from my review is still unaddressed:

  • src/module.c:684 — too-many-aggregators validation gap. A stray aggregator token after the bucketDuration is silently accepted instead of erroring. Confirmed repro on current head: TS.NRANGE 2 k1 k2 - + AGGREGATION avg sum 10 max succeeds (AVG for k1, SUM for k2) with max silently dropped. The guard only inspects the bucketDuration slot (argv[firstAgg+n]), and parseRangeArguments has no unconsumed-argument check. Details + trace in this thread.

Everything else from the review is resolved (or a justified won't-fix nit). Once that leftover-token check is in, ping me and I'll approve. It's a low-severity edge case, so if you'd rather track it as a follow-up issue instead of fixing here, that's fine too — just let me know and I'll approve on that basis.

@TalBarYakar
TalBarYakar force-pushed the tal.ba/feat/Nrange_multi_agg branch from 3174161 to 4d891a8 Compare July 2, 2026 10:13
@sonarqubecloud

sonarqubecloud Bot commented Jul 2, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@TalBarYakar
TalBarYakar merged commit 7d16dbd into master Jul 2, 2026
37 of 38 checks passed
@TalBarYakar
TalBarYakar deleted the tal.ba/feat/Nrange_multi_agg branch July 2, 2026 10:35
TalBarYakar added a commit that referenced this pull request Jul 5, 2026
* Use dedicated redis_ref field in ramp.yml for CI git ref (#2059)

Read the Redis git ref used for builds/tests from a new explicit
redis_ref field in pack/ramp.yml instead of inferring it from
compatible_redis_version (which encodes RAMP packaging semantics, not
CI test targets). This removes the version-mapping logic that mapped the
99.99 / 99.99.99 dev placeholders to "unstable" and used real version
strings as refs verbatim.

On master, redis_ref is "unstable" so Docker/CI track the Redis
development branch; release branches should pin it to the matching
upstream tag/branch (e.g. "8.8").

The event-nightly.yml workflow_dispatch description already referenced
this field; the script now actually reads it.

https://claude.ai/code/session_01W3PvE6uwbJJPoq86DzHrLK

Co-authored-by: Claude <[email protected]>

* pass VG=1 flag to the build as well (#2060)

* Disable _FORTIFY_SOURCE when building Redis for Valgrind runs

The Valgrind nightly fails on replica nodes with "Source and destination
overlap in memcpy_chk" originating in redis-core (readSyncBulkPayload,
replication.c). The underlying source uses memmove() correctly, but under
-O2/-O3 the distro compiler enables _FORTIFY_SOURCE by default and lowers
the memmove() into __memcpy_chk(). Valgrind's overlap check for memcpy is
direction-agnostic, so it flags the (safe) overlapping copy as an error
even though the result is correct -- a false positive, not a real bug.

Fix it at the source by building the test Redis without _FORTIFY_SOURCE,
so the call stays a memmove() (which Valgrind never flags for overlap).
The flag is plumbed through only when run_valgrind is set:

  flow-linux.yml (--build-arg VALGRIND) -> Dockerfile.jammy (ARG VALGRIND)
  -> install_redis.sh (-U_FORTIFY_SOURCE)

All other builds (other OSes, sanitizer, non-Valgrind jammy) are
unchanged and keep fortification. Redis stays optimized; no source change
and no Valgrind suppressions needed.

* unite make build and make install into single line

* MOD-16160 -  wake parked TS.BGET clients on key deletion (#2062)

* fix(bget): wake parked TS.BGET clients on key deletion

Nightly CI was hitting the 6h job timeout on a random x64 distro per
run. Root cause: TS.BGET clients parked on a key are never woken when
the key is removed (DEL/FLUSHALL/expire/eviction) — they wait out their
user-supplied timeout, and the test helper's daemon threads kept the
connection (and the test process) alive long enough to trip the GHA
cancel.

Fix:
- src/tsdb.c: SignalKeyAsReady in FreeSeries — fires on every key
  removal path, no new bookkeeping.
- src/module.c: TSDB_bget_reply_callback probes the key; if it's gone,
  reply empty (require_full_batch=false) instead of re-parking.

Test hardening (tests/flow/test_ts_bget.py):
- BGET timeouts 10_000 ms → 2_000 ms.
- _start_bget sets a socket_timeout and closes the connection in
  finally, so a stuck worker cannot outlive its socket.

* change RedisModule_BlockClientOnKeys  RedisModule_BlockClientOnKeysWithFlags so deleted key will be signaled as well

* add tests to examine the key del behaviour

* increas timeout

* fix remarks

* use RedisModule_KeyExists instead of opening the key

* ci: bump GitHub Actions to Node24-compatible versions (#2035)

* ci: bump GitHub Actions to Node24-compatible versions

GitHub is removing Node20 from runners on 2026-06-16 (default switch to
Node24), with full removal in fall 2026.
See https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/

Bumps to the lowest Node24-compatible major for each action:

- actions/checkout@v4 → v5
- actions/upload-artifact@v4 → v6 (v5 is still node20)
- actions/download-artifact@v4 → v7 (v5/v6 are still node20)
- actions/setup-python@v5 → v6
- aws-actions/configure-aws-credentials@v4 → v6 (v5 is still node20)
- release-drafter/release-drafter@v5 → v7 (v6 is still node20)
- korthout/backport-action@v3 → v4
- actions/create-github-app-token@v1 → v3

Not changed:
- DanielTamkin/[email protected] — only ships node12, no Node24 release
  available. The action is simple enough to inline if it becomes an issue.
- rojopolis/[email protected] — docker action, unaffected.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* ci: drop env GITHUB_TOKEN, set release-drafter v7 token input

release-drafter v7 dropped Probot and no longer reads GITHUB_TOKEN from
the environment. Pass the secret via the `token` input instead.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>

* MOD-15749 Short-form CLUSTERSET: RAMP capability + LibMR error-return (#2065)

* MOD-15749 Advertise short_form_clusterset capability in RAMP manifest

Add `short_form_clusterset` to the module's RAMP capabilities so Redis
Enterprise / DMC can discover that this build accepts the zero-arg short
form of CLUSTERSET (which relies on RedisModule_GetClusterNodeSlotRanges),
instead of inferring support from the module patch version.

Pairs with the LibMR change that makes the short form return an error when
the slot-ranges API is unavailable, so a capability-aware caller can gate the
short form up front and a capability-unaware one can still try-then-fallback.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* MOD-15749 Bump LibMR pin to short-form CLUSTERSET error-return fix

Pin deps/LibMR to the branch commit that makes the short form of CLUSTERSET
reply with an error (instead of a silent +OK) when RedisModule_GetClusterNodeSlotRanges
is unavailable -- RedisGears/LibMR#99.

This pairs with the short_form_clusterset RAMP capability in this PR: a
capability-aware caller (DMC) gates the short form up front; a capability-unaware
one can try the short form and fall back to the long form on the error.

Temporary pin to the PR branch commit; re-pin to LibMR master once #99 merges.

Verified locally on Redis 8.2.1 (which lacks the slot-ranges API): short-form
timeseries.CLUSTERSET now replies "ERRCLUSTER Failed to set cluster topology"
and logs the API-missing warning, instead of replying +OK.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* MOD-15749 Re-pin LibMR to master after #99 merged

RedisGears/LibMR#99 (short-form CLUSTERSET returns an error when the
slot-ranges API is missing) merged to master as a37b672. Move deps/LibMR
from the temporary PR-branch pin to LibMR master HEAD, which also picks up
the intervening master commits #96 (Linux SSL CI hang / testUnevenWork
timeout fix) and #98 (detect oss cluster at MR_ClusterInit).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>

* ci: speed up Event CI (lean PR gate) and shard slow nightly jobs (#2068)

* ci: shard valgrind tests across parallel runners

The full valgrind PR run executes all five test topologies (general,
slaves, AOF, AOF+slaves, OSS cluster) sequentially in a single job,
taking ~4h on a standard runner — unworkable as a PR gate.

No larger x64 runner is provisioned for the org (tracked in CTOI-224)
and a job targeting ubuntu-latest-64-cores is never picked up, so
rather than wait on a bigger box, shard the valgrind job by topology:
setup-environment expands the matrix to one job per topology when
run_valgrind is set, and each job runs exactly that topology. This
spreads the ~4h across 5 standard ubuntu-latest runners (~5x wall-clock
reduction) with no infra changes.

Non-valgrind builds are unchanged (one entry per OS); sanitizer is
unaffected. Result/artifact names are suffixed with the topology so the
five shards stay distinct.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* ci: make PR gate lean (quick + macOS build-only)

The PR Event CI was a near-copy of the nightly: it ran the full 5-topology
suite across the entire 18-OS x64 + 17-OS arm64 + 6-macOS matrix plus
sanitizer on every PR. macOS (serial, PARALLEL=0, unshardable) was the
~177m wall-clock pole.

Adopt redis/redis's tiered model — lean PR gate, exhaustive nightly:
- build-linux-x64 / -arm64: quick=true on PR (GEN topology only).
- linux-sanitizer: quick=true on PR (ASAN, GEN only).
- macOS: compile-only smoke on PR via a new build_only input to
  flow-macos.yml that skips Run tests / Pack / S3 upload.
- linux-valgrind unchanged: it is already topology-sharded across 5
  runners (commit 3082e28), so all topologies still run on PR (~45m)
  and become the new, much lower PR pole.

event-nightly.yml and event-tag.yml don't pass build_only and keep
quick=false, so full topology + macOS test coverage is preserved there.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* ci: shard the nightly sanitizer by topology

The sanitizer (ASAN) job ran all five topologies in a single ~49m job.
Reuse the valgrind topology-sharding path so the sanitizer also fans out
to one runner per topology, cutting its wall-clock to roughly the slowest
single topology (~18-25m).

The matrix-expansion gate now triggers for run_sanitizer as well, but is
guarded by quick \!= true: QUICK=1 forces GEN-only in tests.sh, so sharding
a quick run would just duplicate the GEN topology across five jobs. This
keeps the lean PR sanitizer (quick=true) a single GEN job while the nightly
sanitizer (quick=false) shards. PR/nightly valgrind behaviour is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* ci: run valgrind nightly-only, not on the PR gate

Following redis/redis: valgrind runs in the nightly only, and PRs rely on
ASAN (already in event-ci) for memory-bug coverage. Even sharded across 5
topology runners, valgrind was the ~45m PR wall-clock pole; dropping it
from the PR gate lets PRs finish in ~15-20m. Full 5-topology valgrind
coverage is unchanged in event-nightly.yml. Valgrind-class regressions now
surface in the nightly rather than on the PR.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* ci: PR gate runs full tests on one OS/arch + build-only smokes

Addresses review: the lean PR gate ran GEN-only everywhere, which skipped
the OSS-cluster / LibMR flow on PRs. Restore full coverage on the PR while
keeping it fast:

- event-ci runs the FULL suite (all five topologies, incl. OSS cluster) on
  one OS per arch (jammy x64 + jammy arm64), topology-sharded via the new
  shard_topologies input so the variants run in parallel (~15-20m).
- The other OSes are dramatically reduced to a small, toolchain-diverse
  compile-only smoke set (alpine/amazonlinux/mariner2/rocky9) via a new
  build_only input to flow-linux.yml. The full 18-OS test matrix stays in
  event-nightly.

flow-linux.yml:
- build_only: skip Run tests / Capture / Pack / S3, build the module only.
- shard_topologies: expand a full (quick=0) run to one job per topology
  without needing valgrind/sanitizer. Pack/S3 now also skip topology shards
  so the sharded full-test job doesn't pack/upload five times.
- Move setup-environment inputs (arch, os, quick, run_*, shard) into env
  vars instead of interpolating them in run blocks (fixes the script-
  injection finding flagged by code scanning).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* ci: reduce macOS variants on the PR gate to one per arch

The PR gate ran all six macOS variants as build-only smokes; over the last
14 runs (84 macOS jobs) none of them failed, so six compile-only macOS jobs
per PR is pure overhead. Run a reduced set on PRs — macos-15 (arm) and
macos-26-intel (intel, incl. the special macos-26 SDK path) — covering both
architectures and the newest SDK. The full six-variant macOS matrix still
runs in event-nightly (and event-tag).

flow-macos.yml now accepts a space-separated os list (previously a single
override only), and reads it via an env var instead of interpolating the
input into the run block.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* ci: use azurelinux3 instead of mariner2 in the PR smoke set

Azure Linux 3.0 is the current successor to CBL-Mariner 2.0, so it is the
more relevant Microsoft distro to compile-smoke on PRs. mariner2 still
builds in the full nightly matrix.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* ci: PR gate — newest-only macOS + full-topology ASAN

Two PR-gate refinements (both in event-ci.yml):

- macOS smoke runs the newest macOS only, one per arch: macos-26 (arm) +
  macos-26-intel (intel), instead of macos-15 + macos-26-intel.

- linux-sanitizer drops quick (was GEN-only, ~7.5m) and runs the full
  topology suite under ASAN, sharded one topology per runner via the
  existing shard gate (run_sanitizer + quick=false). Measured: ASAN ≈
  non-ASAN for TS, so each ASAN shard lands ~at the full-test pole (~15m) —
  this adds replication / AOF / cluster / LibMR ASAN coverage on every PR
  without raising the overall PR wall-clock.

The full 6-variant macOS matrix still runs nightly.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>

* MOD-6409 - TS.INFO memoryUsage (and MEMORY USAGE, via the mem_usage callback) (#2067)

* TS.INFO memoryUsage (and MEMORY USAGE, via the mem_usage callback)
under-reported per-key memory, leading to wrong capacity estimates when
prospects size one series and multiply by the planned key count.

Resolves the two remaining items of MOD-6409:

- #7 key name: count series->keyName, a value-owned RedisModuleString
  allocation that was never included.

- #6 label index: add IndexMemUsage(), which estimates a series' share of
  the global label index — the per-key inverse-index dict (tsLabelIndex)
  in full, plus a 1/N slice of each shared labelsIndex leaf. Apportioning
  shared leaves by entry count keeps the property that summing over all
  keys counts the index exactly once. Dict sizes use MallocSizeDict, so
  the figure is an estimate.

* add comment that indicate that the labels->series mapping effect the size mem usage of key and in may change upon other keys change

* add some tests

* MOD-16266 - fix ci hang  (#2066)

* fix(tests): bound blocking waits in flow tests to prevent CI hangs

Several flow tests could block indefinitely when a dependency stalled
(a never-replying shard, an unacked replica, a node that never joins),
running into the 6h CI job timeout instead of failing. Add finite,
Valgrind-aware bounds to every such wait:

- includes.py: HANG_TIMEOUT_SECS (60s / 600s under vg) and
  WAKE_TIMEOUT_SECS (5s / 30s); deadline on verifyClusterInitialized.
- test_ts_libmr_failiure.py: daemon worker threads + bounded joins,
  cluster-init deadline.
- test_asm.py: socket_timeout on the migration-validator connection.
- test_ts_madd.py: finite WAIT timeout (was 0 = infinite).
- test_ts_bget.py: scale wake-test block/join/assert timeouts via
  WAKE_TIMEOUT_SECS so Valgrind's slower wake can't false-fail.

Bounds are generous enough that a healthy (even slow Valgrind) run
always finishes first; they fire only on a genuine stall, with a
[HANG-GUARD] log line pinpointing the culprit.

* try to find the hang test

* add test timeout

* increase timeout to 10 min

* increase timeout to 1800

* fix(tests): import Env from includes in range_empty_filter_stress

Avoids terminateRetries=None (raw RLTest.Env), which made env teardown
wait forever for the replica on SIGTERM and hang until the test timeout.

* revert unnecessary changes

* increase the timout for VG fo 3 hours

* fix(tests): use includes.Env in all test files to prevent teardown hangs

Raw 'from RLTest import Env' creates runners with terminateRetries=None.
RLTest reuses env runners across compatible tests, so any file with the
raw import poisons the runner — teardown then waits forever for the slave
to exit instead of escalating to SIGKILL after ~20s. Fixed all remaining
17 files.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

---------

Co-authored-by: Claude Sonnet 4.6 <[email protected]>

* MOD-15565 -  mrange aggregation execution in inner shards (#2074)

* applly agg in the inner shards when no groupby requested - mrange

* make all the agg be done in the inner shard

* add tests

* clean groupby from inner shard

* add tests

* add some more tests

* tests rename

* squash

* fix multi agg as well

* formatting

* use redismodule api for responding

* add skip aggregation flag

* replace malloc with calloc

* try to fix the fail tests

* zero timestamps for cases where aggregation already being executed in the inner shard

* fix tests

* use anew command for the inner shard with aggregation

* add flow test that check version missmatch

* fix tests

* fix

* tests: use Redis 8.8 binary for old-module nodes in mixed-version cluster test

Build Redis 8.8.0 from source in a parallel thread alongside the origin/master
module build. Old nodes run with the 8.8 redis-server binary whose module API
matches origin/master's own deps/RedisModulesSDK headers — no header patching
needed. New coord continues to use the CI's unstable redis-server.

Also exposes OLD_REDIS_SERVER env var so CI can inject a pre-built binary and
skip the clone+build step.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* fix remarks

* fix: clang-format violation in aggTypes validation

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* fix: route TS.MRANGE through direct shard connection in stride test

Cluster client (getClusterConnectionIfNeeded) can't route multi-key
commands without a slot; use getConnection(1) for reads, matching the
pattern of all other cluster MRANGE tests.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* remove the new flow that supposed to handles upgrade version missmachine

* fix: restore FILTERBY for plain MRANGE queries in cluster mode

RangeArgsSkipReAggregation clears filterByTS/filterByValue args because
shards already applied those filters during pre-aggregation.  After the
unconditional call, FILTERBY was silently dropped for non-aggregation
queries (where shards return raw samples and the coordinator must filter).

Guard the call on aggregationArgs.numClasses > 0 so non-aggregation
paths keep the original args and FILTERBY is applied correctly.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* fix: FILTERBY is always applied by coordinator, not shards

RangeArgsSkipReAggregation was incorrectly clearing filterByTSArgs and
filterByValueArgs.  FILTERBY is always a coordinator-side operation, so
clearing those args caused FILTER_BY_VALUE and FILTER_BY_TS to be silently
dropped in cluster mode for all MRANGE queries.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* fix: restore FILTERBY routing split between coordinator and shards

For aggregation queries, shards pre-aggregate and apply FILTERBY per-series
before the coordinator reduces them.  Re-applying FILTERBY at the coordinator
after GROUPBY+REDUCE corrupts results because the reduce changes the values.

For plain (non-aggregation) queries, shards return raw samples and the
coordinator must apply FILTERBY itself.

Gate RangeArgsSkipReAggregation on aggregationArgs.numClasses > 0 so each
path gets the correct behaviour, matching the original split-command design.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* fix: shards always apply FILTERBY, coordinator never re-applies it

Previously FILTERBY was only propagated to the shard's mrangeArgs when
numAggClasses > 0.  For plain (non-aggregation) queries the shard skipped
it, forcing the coordinator to apply it — but the coordinator's
RangeArgsSkipReAggregation was already clearing those args for all queries,
so FILTERBY was silently dropped.

Move filterByValueArgs/filterByTSArgs assignment outside the aggregation
block in TS_INTERNAL_MRANGE_impl so shards always filter.  The coordinator
then unconditionally skips FILTERBY via RangeArgsSkipReAggregation, which
is correct for all paths including GROUPBY+REDUCE.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* fix: clamp ParseSeriesAllAggs numAgg to minNumAgg floor

When a populated key's first sample has fewer elements than the
shard-wide minNumAgg (determined by SeriesListReplyParser's first
pass), the unconditional overwrite could drop numAgg below the floor,
producing fewer Series entries than expected and breaking the fixed
stride in mrange_done_internal.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* chore: revert deps/LibMR to master's commit

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* reverted libmr change

---------

Co-authored-by: Claude Sonnet 4.6 <[email protected]>

* MOD-16505 - change TS.BGET command to TS.READ (#2081)

* Rename TS.BGET to TS.READ with updated blocking syntax

## Motivation

TS.BGET used a required positional `timeout` argument, with timeout=0
meaning "do not block". This conflated two distinct concepts (blocking
vs. timeout duration) in a single value, and made the non-blocking
case look like a degenerate timeout rather than an intentional choice.

## Syntax change

  Old: TS.BGET key timestamp timeout [MIN_COUNT min_count] [MAX_COUNT max_count]
  New: TS.READ key timestamp [BLOCK milliseconds min_count] [MAX_COUNT max_count]

Key differences:
- Blocking is now opt-in via the optional BLOCK keyword. Omitting BLOCK
  returns immediately (non-blocking), consistent with how TS.XREAD and
  other Redis blocking commands express the distinction.
- `milliseconds` and `min_count` are grouped together inside BLOCK,
  making the relationship explicit: both only apply when blocking.
- `BLOCK 0 min_count` means block forever (Redis convention: BLPOP,
  XREAD BLOCK 0), freeing `timeout=0` from its overloaded meaning.
- `MIN_COUNT` is no longer a standalone optional keyword; it is a
  required positional argument inside the BLOCK group.
- `MAX_COUNT` remains an independent optional keyword, unchanged.
- Minimum arity drops from 4 to 3 (timeout was previously required).

Valid argc values: 3, 5 (MAX_COUNT only), 6 (BLOCK only), 8 (both).

## Implementation

- `ReadCtx` gains an explicit `bool blocking_req` field. `timeout_ms`
  is now a plain non-negative value meaningful only when `blocking_req`
  is true. The previous sentinel (`-1LL`) is removed entirely.
- `parse_read_args` detects BLOCK/MAX_COUNT presence first, computes
  the expected argc from named constants (READ_BLOCK_TOKENS,
  READ_MAX_COUNT_TOKENS), and rejects mismatches with WrongArity.
- The fast-path dispatch in `TSDB_read` uses `args.blocking_req` to
  choose between flush mode (non-blocking, always replies immediately)
  and strict mode (blocking, parks the client if min_count not yet met).
- All internal identifiers renamed: TSDB_bget* → TSDB_read*,
  BGetCtx → ReadCtx, BGET_* → READ_*.

## Files changed

- src/module.c: core rename + parse/dispatch logic rewrite
- src/cmd_info/ts_info.c: arg schema updated (arity -4 → -3, BLOCK
  group replaces positional timeout + MIN_COUNT keyword)
- commands.json: entry renamed, argument structure updated
- tests/flow/test_ts_bget.py → test_ts_read.py: all call sites updated
  to new syntax; bad_argv test rewritten for new validation paths;
  non-blocking test updated (no BLOCK = immediate return)

* enhance tests

* formatting

* fix remarks

* MOD-14615: run valgrind test suite serially to avoid CPU oversubscription (#2083)

test_asm_with_data_and_queries_during_migrations flaked on the valgrind oss_cluster
nightly with a multi-shard max-idle ("did not reply within the given timeframe").

Root cause: the hosted runner runs the flow suite at --parallelism nproc, and each
redis-server is ~30x slower under valgrind, so many concurrent test clusters
oversubscribe the CPU -- a shard gets starved past LibMR's 5s max-idle during
migration churn. Not a product bug: in production each shard has its own core, so 5s
is ample. macOS already runs serially for a similar reason.

Run valgrind serially (PARALLEL=0) so each shard gets a core and the default 5s holds.
Verified: with PARALLEL=0 the valgrind oss_cluster shard went 435/435 green at the
default 5s (run 28498734942), no timeout change.

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>

* MOD-14615: skip test_asm migration-query test on macos-15-intel (#2084)

test_asm_with_data_and_queries_during_migrations occasionally fails on the
macos-15-intel nightly runner: it gets LibMR's 5s max-idle ("did not reply
within the given timeframe") instead of the expected "Query requires
unavailable slots", tripping the assert at test_asm.py:70.

Root cause is runner speed, not a product bug -- macos-15-intel is the
slowest/oldest hosted Intel box; the other 5 macOS runners (incl. macos-26-intel)
and all Linux topologies pass the same test. macOS already runs serially, so the
valgrind-oversubscription fix (#2083) doesn't apply here.

Export the matrix runner label as RUNNER_LABEL and skip only this one test on
macos-15-intel. Coverage is preserved everywhere else.

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>

* MOD-16299 - NRANGE support multiple aggregations (#2079)

* nrange support multi agg

* add some tests

* formatting

* flatten response for multi arggs

* save

* nrange cp inly inner agg

* fix the bad indexing

* formatting

* code review

* fix remarks

* fix remarks

* test the cross slot error

* fix remarks

* MOD-16514 - fix bootstrap & build for all os (#2082)

* install aws if and only if it is not installed yet

* add another build fixes

* fix build for amazonlinux2

* fix(al2): add cc symlink to devtoolset-11 to fix LTO version mismatch

* alma8 +rhel8+rhel9+bionic +focal passes

* fix for bionic

* fix

* fix the bionix botstrap

* bionic fix

* fix for bullesye

* fix for focal

* fix focal

* fix for focak

* fix for bionic & focal

* fix for focal

* fix remarks

* fix remarks

* try another methood

---------

Co-authored-by: Tom Gabsow <[email protected]>
Co-authored-by: Claude <[email protected]>
gabsow added a commit that referenced this pull request Jul 16, 2026
* Use dedicated redis_ref field in ramp.yml for CI git ref (#2059)

Read the Redis git ref used for builds/tests from a new explicit
redis_ref field in pack/ramp.yml instead of inferring it from
compatible_redis_version (which encodes RAMP packaging semantics, not
CI test targets). This removes the version-mapping logic that mapped the
99.99 / 99.99.99 dev placeholders to "unstable" and used real version
strings as refs verbatim.

On master, redis_ref is "unstable" so Docker/CI track the Redis
development branch; release branches should pin it to the matching
upstream tag/branch (e.g. "8.8").

The event-nightly.yml workflow_dispatch description already referenced
this field; the script now actually reads it.

https://claude.ai/code/session_01W3PvE6uwbJJPoq86DzHrLK

Co-authored-by: Claude <[email protected]>

* pass VG=1 flag to the build as well (#2060)

* Disable _FORTIFY_SOURCE when building Redis for Valgrind runs

The Valgrind nightly fails on replica nodes with "Source and destination
overlap in memcpy_chk" originating in redis-core (readSyncBulkPayload,
replication.c). The underlying source uses memmove() correctly, but under
-O2/-O3 the distro compiler enables _FORTIFY_SOURCE by default and lowers
the memmove() into __memcpy_chk(). Valgrind's overlap check for memcpy is
direction-agnostic, so it flags the (safe) overlapping copy as an error
even though the result is correct -- a false positive, not a real bug.

Fix it at the source by building the test Redis without _FORTIFY_SOURCE,
so the call stays a memmove() (which Valgrind never flags for overlap).
The flag is plumbed through only when run_valgrind is set:

  flow-linux.yml (--build-arg VALGRIND) -> Dockerfile.jammy (ARG VALGRIND)
  -> install_redis.sh (-U_FORTIFY_SOURCE)

All other builds (other OSes, sanitizer, non-Valgrind jammy) are
unchanged and keep fortification. Redis stays optimized; no source change
and no Valgrind suppressions needed.

* unite make build and make install into single line

* MOD-16160 -  wake parked TS.BGET clients on key deletion (#2062)

* fix(bget): wake parked TS.BGET clients on key deletion

Nightly CI was hitting the 6h job timeout on a random x64 distro per
run. Root cause: TS.BGET clients parked on a key are never woken when
the key is removed (DEL/FLUSHALL/expire/eviction) — they wait out their
user-supplied timeout, and the test helper's daemon threads kept the
connection (and the test process) alive long enough to trip the GHA
cancel.

Fix:
- src/tsdb.c: SignalKeyAsReady in FreeSeries — fires on every key
  removal path, no new bookkeeping.
- src/module.c: TSDB_bget_reply_callback probes the key; if it's gone,
  reply empty (require_full_batch=false) instead of re-parking.

Test hardening (tests/flow/test_ts_bget.py):
- BGET timeouts 10_000 ms → 2_000 ms.
- _start_bget sets a socket_timeout and closes the connection in
  finally, so a stuck worker cannot outlive its socket.

* change RedisModule_BlockClientOnKeys  RedisModule_BlockClientOnKeysWithFlags so deleted key will be signaled as well

* add tests to examine the key del behaviour

* increas timeout

* fix remarks

* use RedisModule_KeyExists instead of opening the key

* ci: bump GitHub Actions to Node24-compatible versions (#2035)

* ci: bump GitHub Actions to Node24-compatible versions

GitHub is removing Node20 from runners on 2026-06-16 (default switch to
Node24), with full removal in fall 2026.
See https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/

Bumps to the lowest Node24-compatible major for each action:

- actions/checkout@v4 → v5
- actions/upload-artifact@v4 → v6 (v5 is still node20)
- actions/download-artifact@v4 → v7 (v5/v6 are still node20)
- actions/setup-python@v5 → v6
- aws-actions/configure-aws-credentials@v4 → v6 (v5 is still node20)
- release-drafter/release-drafter@v5 → v7 (v6 is still node20)
- korthout/backport-action@v3 → v4
- actions/create-github-app-token@v1 → v3

Not changed:
- DanielTamkin/[email protected] — only ships node12, no Node24 release
  available. The action is simple enough to inline if it becomes an issue.
- rojopolis/[email protected] — docker action, unaffected.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* ci: drop env GITHUB_TOKEN, set release-drafter v7 token input

release-drafter v7 dropped Probot and no longer reads GITHUB_TOKEN from
the environment. Pass the secret via the `token` input instead.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>

* MOD-15749 Short-form CLUSTERSET: RAMP capability + LibMR error-return (#2065)

* MOD-15749 Advertise short_form_clusterset capability in RAMP manifest

Add `short_form_clusterset` to the module's RAMP capabilities so Redis
Enterprise / DMC can discover that this build accepts the zero-arg short
form of CLUSTERSET (which relies on RedisModule_GetClusterNodeSlotRanges),
instead of inferring support from the module patch version.

Pairs with the LibMR change that makes the short form return an error when
the slot-ranges API is unavailable, so a capability-aware caller can gate the
short form up front and a capability-unaware one can still try-then-fallback.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* MOD-15749 Bump LibMR pin to short-form CLUSTERSET error-return fix

Pin deps/LibMR to the branch commit that makes the short form of CLUSTERSET
reply with an error (instead of a silent +OK) when RedisModule_GetClusterNodeSlotRanges
is unavailable -- RedisGears/LibMR#99.

This pairs with the short_form_clusterset RAMP capability in this PR: a
capability-aware caller (DMC) gates the short form up front; a capability-unaware
one can try the short form and fall back to the long form on the error.

Temporary pin to the PR branch commit; re-pin to LibMR master once #99 merges.

Verified locally on Redis 8.2.1 (which lacks the slot-ranges API): short-form
timeseries.CLUSTERSET now replies "ERRCLUSTER Failed to set cluster topology"
and logs the API-missing warning, instead of replying +OK.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* MOD-15749 Re-pin LibMR to master after #99 merged

RedisGears/LibMR#99 (short-form CLUSTERSET returns an error when the
slot-ranges API is missing) merged to master as a37b672. Move deps/LibMR
from the temporary PR-branch pin to LibMR master HEAD, which also picks up
the intervening master commits #96 (Linux SSL CI hang / testUnevenWork
timeout fix) and #98 (detect oss cluster at MR_ClusterInit).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>

* ci: speed up Event CI (lean PR gate) and shard slow nightly jobs (#2068)

* ci: shard valgrind tests across parallel runners

The full valgrind PR run executes all five test topologies (general,
slaves, AOF, AOF+slaves, OSS cluster) sequentially in a single job,
taking ~4h on a standard runner — unworkable as a PR gate.

No larger x64 runner is provisioned for the org (tracked in CTOI-224)
and a job targeting ubuntu-latest-64-cores is never picked up, so
rather than wait on a bigger box, shard the valgrind job by topology:
setup-environment expands the matrix to one job per topology when
run_valgrind is set, and each job runs exactly that topology. This
spreads the ~4h across 5 standard ubuntu-latest runners (~5x wall-clock
reduction) with no infra changes.

Non-valgrind builds are unchanged (one entry per OS); sanitizer is
unaffected. Result/artifact names are suffixed with the topology so the
five shards stay distinct.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* ci: make PR gate lean (quick + macOS build-only)

The PR Event CI was a near-copy of the nightly: it ran the full 5-topology
suite across the entire 18-OS x64 + 17-OS arm64 + 6-macOS matrix plus
sanitizer on every PR. macOS (serial, PARALLEL=0, unshardable) was the
~177m wall-clock pole.

Adopt redis/redis's tiered model — lean PR gate, exhaustive nightly:
- build-linux-x64 / -arm64: quick=true on PR (GEN topology only).
- linux-sanitizer: quick=true on PR (ASAN, GEN only).
- macOS: compile-only smoke on PR via a new build_only input to
  flow-macos.yml that skips Run tests / Pack / S3 upload.
- linux-valgrind unchanged: it is already topology-sharded across 5
  runners (commit 3082e28), so all topologies still run on PR (~45m)
  and become the new, much lower PR pole.

event-nightly.yml and event-tag.yml don't pass build_only and keep
quick=false, so full topology + macOS test coverage is preserved there.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* ci: shard the nightly sanitizer by topology

The sanitizer (ASAN) job ran all five topologies in a single ~49m job.
Reuse the valgrind topology-sharding path so the sanitizer also fans out
to one runner per topology, cutting its wall-clock to roughly the slowest
single topology (~18-25m).

The matrix-expansion gate now triggers for run_sanitizer as well, but is
guarded by quick \!= true: QUICK=1 forces GEN-only in tests.sh, so sharding
a quick run would just duplicate the GEN topology across five jobs. This
keeps the lean PR sanitizer (quick=true) a single GEN job while the nightly
sanitizer (quick=false) shards. PR/nightly valgrind behaviour is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* ci: run valgrind nightly-only, not on the PR gate

Following redis/redis: valgrind runs in the nightly only, and PRs rely on
ASAN (already in event-ci) for memory-bug coverage. Even sharded across 5
topology runners, valgrind was the ~45m PR wall-clock pole; dropping it
from the PR gate lets PRs finish in ~15-20m. Full 5-topology valgrind
coverage is unchanged in event-nightly.yml. Valgrind-class regressions now
surface in the nightly rather than on the PR.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* ci: PR gate runs full tests on one OS/arch + build-only smokes

Addresses review: the lean PR gate ran GEN-only everywhere, which skipped
the OSS-cluster / LibMR flow on PRs. Restore full coverage on the PR while
keeping it fast:

- event-ci runs the FULL suite (all five topologies, incl. OSS cluster) on
  one OS per arch (jammy x64 + jammy arm64), topology-sharded via the new
  shard_topologies input so the variants run in parallel (~15-20m).
- The other OSes are dramatically reduced to a small, toolchain-diverse
  compile-only smoke set (alpine/amazonlinux/mariner2/rocky9) via a new
  build_only input to flow-linux.yml. The full 18-OS test matrix stays in
  event-nightly.

flow-linux.yml:
- build_only: skip Run tests / Capture / Pack / S3, build the module only.
- shard_topologies: expand a full (quick=0) run to one job per topology
  without needing valgrind/sanitizer. Pack/S3 now also skip topology shards
  so the sharded full-test job doesn't pack/upload five times.
- Move setup-environment inputs (arch, os, quick, run_*, shard) into env
  vars instead of interpolating them in run blocks (fixes the script-
  injection finding flagged by code scanning).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* ci: reduce macOS variants on the PR gate to one per arch

The PR gate ran all six macOS variants as build-only smokes; over the last
14 runs (84 macOS jobs) none of them failed, so six compile-only macOS jobs
per PR is pure overhead. Run a reduced set on PRs — macos-15 (arm) and
macos-26-intel (intel, incl. the special macos-26 SDK path) — covering both
architectures and the newest SDK. The full six-variant macOS matrix still
runs in event-nightly (and event-tag).

flow-macos.yml now accepts a space-separated os list (previously a single
override only), and reads it via an env var instead of interpolating the
input into the run block.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* ci: use azurelinux3 instead of mariner2 in the PR smoke set

Azure Linux 3.0 is the current successor to CBL-Mariner 2.0, so it is the
more relevant Microsoft distro to compile-smoke on PRs. mariner2 still
builds in the full nightly matrix.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* ci: PR gate — newest-only macOS + full-topology ASAN

Two PR-gate refinements (both in event-ci.yml):

- macOS smoke runs the newest macOS only, one per arch: macos-26 (arm) +
  macos-26-intel (intel), instead of macos-15 + macos-26-intel.

- linux-sanitizer drops quick (was GEN-only, ~7.5m) and runs the full
  topology suite under ASAN, sharded one topology per runner via the
  existing shard gate (run_sanitizer + quick=false). Measured: ASAN ≈
  non-ASAN for TS, so each ASAN shard lands ~at the full-test pole (~15m) —
  this adds replication / AOF / cluster / LibMR ASAN coverage on every PR
  without raising the overall PR wall-clock.

The full 6-variant macOS matrix still runs nightly.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>

* MOD-6409 - TS.INFO memoryUsage (and MEMORY USAGE, via the mem_usage callback) (#2067)

* TS.INFO memoryUsage (and MEMORY USAGE, via the mem_usage callback)
under-reported per-key memory, leading to wrong capacity estimates when
prospects size one series and multiply by the planned key count.

Resolves the two remaining items of MOD-6409:

- #7 key name: count series->keyName, a value-owned RedisModuleString
  allocation that was never included.

- #6 label index: add IndexMemUsage(), which estimates a series' share of
  the global label index — the per-key inverse-index dict (tsLabelIndex)
  in full, plus a 1/N slice of each shared labelsIndex leaf. Apportioning
  shared leaves by entry count keeps the property that summing over all
  keys counts the index exactly once. Dict sizes use MallocSizeDict, so
  the figure is an estimate.

* add comment that indicate that the labels->series mapping effect the size mem usage of key and in may change upon other keys change

* add some tests

* MOD-16266 - fix ci hang  (#2066)

* fix(tests): bound blocking waits in flow tests to prevent CI hangs

Several flow tests could block indefinitely when a dependency stalled
(a never-replying shard, an unacked replica, a node that never joins),
running into the 6h CI job timeout instead of failing. Add finite,
Valgrind-aware bounds to every such wait:

- includes.py: HANG_TIMEOUT_SECS (60s / 600s under vg) and
  WAKE_TIMEOUT_SECS (5s / 30s); deadline on verifyClusterInitialized.
- test_ts_libmr_failiure.py: daemon worker threads + bounded joins,
  cluster-init deadline.
- test_asm.py: socket_timeout on the migration-validator connection.
- test_ts_madd.py: finite WAIT timeout (was 0 = infinite).
- test_ts_bget.py: scale wake-test block/join/assert timeouts via
  WAKE_TIMEOUT_SECS so Valgrind's slower wake can't false-fail.

Bounds are generous enough that a healthy (even slow Valgrind) run
always finishes first; they fire only on a genuine stall, with a
[HANG-GUARD] log line pinpointing the culprit.

* try to find the hang test

* add test timeout

* increase timeout to 10 min

* increase timeout to 1800

* fix(tests): import Env from includes in range_empty_filter_stress

Avoids terminateRetries=None (raw RLTest.Env), which made env teardown
wait forever for the replica on SIGTERM and hang until the test timeout.

* revert unnecessary changes

* increase the timout for VG fo 3 hours

* fix(tests): use includes.Env in all test files to prevent teardown hangs

Raw 'from RLTest import Env' creates runners with terminateRetries=None.
RLTest reuses env runners across compatible tests, so any file with the
raw import poisons the runner — teardown then waits forever for the slave
to exit instead of escalating to SIGKILL after ~20s. Fixed all remaining
17 files.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

---------

Co-authored-by: Claude Sonnet 4.6 <[email protected]>

* MOD-15565 -  mrange aggregation execution in inner shards (#2074)

* applly agg in the inner shards when no groupby requested - mrange

* make all the agg be done in the inner shard

* add tests

* clean groupby from inner shard

* add tests

* add some more tests

* tests rename

* squash

* fix multi agg as well

* formatting

* use redismodule api for responding

* add skip aggregation flag

* replace malloc with calloc

* try to fix the fail tests

* zero timestamps for cases where aggregation already being executed in the inner shard

* fix tests

* use anew command for the inner shard with aggregation

* add flow test that check version missmatch

* fix tests

* fix

* tests: use Redis 8.8 binary for old-module nodes in mixed-version cluster test

Build Redis 8.8.0 from source in a parallel thread alongside the origin/master
module build. Old nodes run with the 8.8 redis-server binary whose module API
matches origin/master's own deps/RedisModulesSDK headers — no header patching
needed. New coord continues to use the CI's unstable redis-server.

Also exposes OLD_REDIS_SERVER env var so CI can inject a pre-built binary and
skip the clone+build step.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* fix remarks

* fix: clang-format violation in aggTypes validation

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* fix: route TS.MRANGE through direct shard connection in stride test

Cluster client (getClusterConnectionIfNeeded) can't route multi-key
commands without a slot; use getConnection(1) for reads, matching the
pattern of all other cluster MRANGE tests.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* remove the new flow that supposed to handles upgrade version missmachine

* fix: restore FILTERBY for plain MRANGE queries in cluster mode

RangeArgsSkipReAggregation clears filterByTS/filterByValue args because
shards already applied those filters during pre-aggregation.  After the
unconditional call, FILTERBY was silently dropped for non-aggregation
queries (where shards return raw samples and the coordinator must filter).

Guard the call on aggregationArgs.numClasses > 0 so non-aggregation
paths keep the original args and FILTERBY is applied correctly.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* fix: FILTERBY is always applied by coordinator, not shards

RangeArgsSkipReAggregation was incorrectly clearing filterByTSArgs and
filterByValueArgs.  FILTERBY is always a coordinator-side operation, so
clearing those args caused FILTER_BY_VALUE and FILTER_BY_TS to be silently
dropped in cluster mode for all MRANGE queries.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* fix: restore FILTERBY routing split between coordinator and shards

For aggregation queries, shards pre-aggregate and apply FILTERBY per-series
before the coordinator reduces them.  Re-applying FILTERBY at the coordinator
after GROUPBY+REDUCE corrupts results because the reduce changes the values.

For plain (non-aggregation) queries, shards return raw samples and the
coordinator must apply FILTERBY itself.

Gate RangeArgsSkipReAggregation on aggregationArgs.numClasses > 0 so each
path gets the correct behaviour, matching the original split-command design.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* fix: shards always apply FILTERBY, coordinator never re-applies it

Previously FILTERBY was only propagated to the shard's mrangeArgs when
numAggClasses > 0.  For plain (non-aggregation) queries the shard skipped
it, forcing the coordinator to apply it — but the coordinator's
RangeArgsSkipReAggregation was already clearing those args for all queries,
so FILTERBY was silently dropped.

Move filterByValueArgs/filterByTSArgs assignment outside the aggregation
block in TS_INTERNAL_MRANGE_impl so shards always filter.  The coordinator
then unconditionally skips FILTERBY via RangeArgsSkipReAggregation, which
is correct for all paths including GROUPBY+REDUCE.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* fix: clamp ParseSeriesAllAggs numAgg to minNumAgg floor

When a populated key's first sample has fewer elements than the
shard-wide minNumAgg (determined by SeriesListReplyParser's first
pass), the unconditional overwrite could drop numAgg below the floor,
producing fewer Series entries than expected and breaking the fixed
stride in mrange_done_internal.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* chore: revert deps/LibMR to master's commit

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* reverted libmr change

---------

Co-authored-by: Claude Sonnet 4.6 <[email protected]>

* MOD-16505 - change TS.BGET command to TS.READ (#2081)

* Rename TS.BGET to TS.READ with updated blocking syntax

## Motivation

TS.BGET used a required positional `timeout` argument, with timeout=0
meaning "do not block". This conflated two distinct concepts (blocking
vs. timeout duration) in a single value, and made the non-blocking
case look like a degenerate timeout rather than an intentional choice.

## Syntax change

  Old: TS.BGET key timestamp timeout [MIN_COUNT min_count] [MAX_COUNT max_count]
  New: TS.READ key timestamp [BLOCK milliseconds min_count] [MAX_COUNT max_count]

Key differences:
- Blocking is now opt-in via the optional BLOCK keyword. Omitting BLOCK
  returns immediately (non-blocking), consistent with how TS.XREAD and
  other Redis blocking commands express the distinction.
- `milliseconds` and `min_count` are grouped together inside BLOCK,
  making the relationship explicit: both only apply when blocking.
- `BLOCK 0 min_count` means block forever (Redis convention: BLPOP,
  XREAD BLOCK 0), freeing `timeout=0` from its overloaded meaning.
- `MIN_COUNT` is no longer a standalone optional keyword; it is a
  required positional argument inside the BLOCK group.
- `MAX_COUNT` remains an independent optional keyword, unchanged.
- Minimum arity drops from 4 to 3 (timeout was previously required).

Valid argc values: 3, 5 (MAX_COUNT only), 6 (BLOCK only), 8 (both).

## Implementation

- `ReadCtx` gains an explicit `bool blocking_req` field. `timeout_ms`
  is now a plain non-negative value meaningful only when `blocking_req`
  is true. The previous sentinel (`-1LL`) is removed entirely.
- `parse_read_args` detects BLOCK/MAX_COUNT presence first, computes
  the expected argc from named constants (READ_BLOCK_TOKENS,
  READ_MAX_COUNT_TOKENS), and rejects mismatches with WrongArity.
- The fast-path dispatch in `TSDB_read` uses `args.blocking_req` to
  choose between flush mode (non-blocking, always replies immediately)
  and strict mode (blocking, parks the client if min_count not yet met).
- All internal identifiers renamed: TSDB_bget* → TSDB_read*,
  BGetCtx → ReadCtx, BGET_* → READ_*.

## Files changed

- src/module.c: core rename + parse/dispatch logic rewrite
- src/cmd_info/ts_info.c: arg schema updated (arity -4 → -3, BLOCK
  group replaces positional timeout + MIN_COUNT keyword)
- commands.json: entry renamed, argument structure updated
- tests/flow/test_ts_bget.py → test_ts_read.py: all call sites updated
  to new syntax; bad_argv test rewritten for new validation paths;
  non-blocking test updated (no BLOCK = immediate return)

* enhance tests

* formatting

* fix remarks

* MOD-14615: run valgrind test suite serially to avoid CPU oversubscription (#2083)

test_asm_with_data_and_queries_during_migrations flaked on the valgrind oss_cluster
nightly with a multi-shard max-idle ("did not reply within the given timeframe").

Root cause: the hosted runner runs the flow suite at --parallelism nproc, and each
redis-server is ~30x slower under valgrind, so many concurrent test clusters
oversubscribe the CPU -- a shard gets starved past LibMR's 5s max-idle during
migration churn. Not a product bug: in production each shard has its own core, so 5s
is ample. macOS already runs serially for a similar reason.

Run valgrind serially (PARALLEL=0) so each shard gets a core and the default 5s holds.
Verified: with PARALLEL=0 the valgrind oss_cluster shard went 435/435 green at the
default 5s (run 28498734942), no timeout change.

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>

* MOD-14615: skip test_asm migration-query test on macos-15-intel (#2084)

test_asm_with_data_and_queries_during_migrations occasionally fails on the
macos-15-intel nightly runner: it gets LibMR's 5s max-idle ("did not reply
within the given timeframe") instead of the expected "Query requires
unavailable slots", tripping the assert at test_asm.py:70.

Root cause is runner speed, not a product bug -- macos-15-intel is the
slowest/oldest hosted Intel box; the other 5 macOS runners (incl. macos-26-intel)
and all Linux topologies pass the same test. macOS already runs serially, so the
valgrind-oversubscription fix (#2083) doesn't apply here.

Export the matrix runner label as RUNNER_LABEL and skip only this one test on
macos-15-intel. Coverage is preserved everywhere else.

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>

* MOD-16299 - NRANGE support multiple aggregations (#2079)

* nrange support multi agg

* add some tests

* formatting

* flatten response for multi arggs

* save

* nrange cp inly inner agg

* fix the bad indexing

* formatting

* code review

* fix remarks

* fix remarks

* test the cross slot error

* fix remarks

* MOD-16514 - fix bootstrap & build for all os (#2082)

* install aws if and only if it is not installed yet

* add another build fixes

* fix build for amazonlinux2

* fix(al2): add cc symlink to devtoolset-11 to fix LTO version mismatch

* alma8 +rhel8+rhel9+bionic +focal passes

* fix for bionic

* fix

* fix the bionix botstrap

* bionic fix

* fix for bullesye

* fix for focal

* fix focal

* fix for focak

* fix for bionic & focal

* fix for focal

* fix remarks

* fix remarks

* try another methood

* MOD-16653 Prevent more  heap overflow + other rdb load asserions (#2086)

* MOD-16172 - support exclude empty in mrange commands (#2072)

* add EXCLUDEEMPTY flag to TS.MRANGE / TS.MREVRANGE

Filtering is applied per inner shard (not the coordinator), consistent
with how aggregation and FILTERBY are handled. The standalone path
filters in replyUngroupedMultiRange. EXCLUDEEMPTY and GROUPBY are
mutually exclusive.

* fix remarks

* aplly changes to make the check fo empty series more effiecient

* dix code remarks

* add to command info

* ci: add code coverage to CI — PR + nightly (lcov -> Codecov) (#2070)

* ci: add code-coverage job to the nightly (lcov -> Codecov)

The repo already has the coverage plumbing (`make coverage`, COV=1 -> gcov,
codecov.yml, lcov in the build image) but it was never wired into CI. Add a
nightly coverage job:

- New reusable flow-coverage.yml: builds the jammy image, runs
  `make coverage COV=1 QUICK=1` (instrumented build + GEN tests + lcov collect
  -> bin/<platform>/cov.info), then uploads the report to Codecov via
  codecov/codecov-action@v5 and keeps a cov.info artifact.
- event-nightly.yml gains a `coverage` job that calls it, gated by the repo
  variable ENABLE_CODE_COVERAGE (defaults on; set to 'false' to disable).

COV=1 is passed at the top level on purpose: the lcov reset/collect macros in
readies/mk/coverage.defs are guarded by `ifeq ($(COV),1)`, so without it the
build is instrumented but no report is collected.

Coverage is nightly-only (instrumented build is slow) — the PR gate stays lean.
CODECOV_TOKEN is passed explicitly (not via `secrets: inherit`) to the reusable
workflow.

Requires repo config: CODECOV_TOKEN secret (for uploads) and, optionally, the
ENABLE_CODE_COVERAGE variable.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* ci: also run coverage on the PR gate (Codecov diff comment)

Mirror RedisJSON: run the coverage job on event-ci too, not just nightly, so
Codecov posts a per-PR diff-coverage comment. Gated to skip draft PRs and the
ENABLE_CODE_COVERAGE='false' toggle.

flow-coverage.yml now checks out with fetch-depth: 0 so Codecov can resolve the
PR base for accurate diff coverage.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>

* fix(alpine): use distro python3 for the test venv (avoid uv musl clang standalone) (#2089)

setup-python.sh's uv venv otherwise downloads uv's standalone musl CPython,
which is clang-built and bakes --rtlib=compiler-rt into its sysconfig; sdist-
only test deps lacking musl wheels (psutil via rltest) then fail to compile
with Alpine's gcc. Pin SETUP_PYTHON_VERSION to Alpine's own python3 (installed
with python3-dev) and forbid uv downloads. Mirrors the EL8 python pin.

Co-authored-by: Claude Fable 5 <[email protected]>

* MOD-16370 Introduce `TS.QUERYLABELS`: Get a list of labels and label-… (#2090)

* MOD-16370 Intreduce `TS.QUERYLABELS`: Get a list of labels and label-values

* CR + Format

* fix test

* CR

* CR

* format

* CR

* format

* use try calloc

* add GEARS protocol support

* MOD-16873 `TS.INCRBY` replicate master timestamp when timestamp is lo… (#2109)

* MOD-16873 `TS.INCRBY` replicate master timestamp when timestamp is local server clock

* .

* MOD-16306 - use registry for pulling / pushing docker images  (#2098)

* upload imagw to registry patch

* add new flow to push image to registry

* dix runner

* push the image to time series

* rename dir

* change the flow-linux.yml
so jammy job will pull image instead of building it

* fix auth

* remove pull request path

* full linux matrix

* fix

* patch: trigger on PR

* fix

* fix naming

* fixed

* updater the trigger path

* update the tag name flow

* fix remarks

* re run job

* use docker-image_version in ramp.yml file to identify image version (#2094)

* test: add local brnach to the push images checkk

* (test): new PR will not release existing image

* make it runs if change in the version

* fix remarks

* fix remarks

* fix the flow to meet the new requirments

* fix remarks

* MOD-16364 - update requirements deps (#2108)

* squash

* try to fix the apt hangup

* fix ubuntu hangs  (#2115)

* change to 4 parralel jobs

* test

* unite build and push

* revert patchs

* MOD-16382 Handle topology-change notifications (#2104)

* MOD-16382 Handle topology-change notifications

Cleanup - remove a stale function that was used for the (no longer supported) ts-global-password config

* Use l&g version of modules sdk

* Added a log-only cluster-topology callback

* Use version of libmr from a side branch

* Added the actual call to the topology update + format

* Use the updated version of libmr from a side branch

* add ts-topology-events config to gate topology-change subscription

* Disable the subscription on topology changes in tests that are designed for the older (command-based) changes

* update to libMR master

---------

Co-authored-by: Tom Gabsow <[email protected]>
Co-authored-by: Tom Gabsow <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
Co-authored-by: Tal Bar Yakar <[email protected]>
Co-authored-by: Aviv David <[email protected]>
Co-authored-by: Gal Cohen <[email protected]>
TalBarYakar added a commit that referenced this pull request Jul 28, 2026
* Use dedicated redis_ref field in ramp.yml for CI git ref (#2059)

Read the Redis git ref used for builds/tests from a new explicit
redis_ref field in pack/ramp.yml instead of inferring it from
compatible_redis_version (which encodes RAMP packaging semantics, not
CI test targets). This removes the version-mapping logic that mapped the
99.99 / 99.99.99 dev placeholders to "unstable" and used real version
strings as refs verbatim.

On master, redis_ref is "unstable" so Docker/CI track the Redis
development branch; release branches should pin it to the matching
upstream tag/branch (e.g. "8.8").

The event-nightly.yml workflow_dispatch description already referenced
this field; the script now actually reads it.

https://claude.ai/code/session_01W3PvE6uwbJJPoq86DzHrLK

Co-authored-by: Claude <[email protected]>

* pass VG=1 flag to the build as well (#2060)

* Disable _FORTIFY_SOURCE when building Redis for Valgrind runs

The Valgrind nightly fails on replica nodes with "Source and destination
overlap in memcpy_chk" originating in redis-core (readSyncBulkPayload,
replication.c). The underlying source uses memmove() correctly, but under
-O2/-O3 the distro compiler enables _FORTIFY_SOURCE by default and lowers
the memmove() into __memcpy_chk(). Valgrind's overlap check for memcpy is
direction-agnostic, so it flags the (safe) overlapping copy as an error
even though the result is correct -- a false positive, not a real bug.

Fix it at the source by building the test Redis without _FORTIFY_SOURCE,
so the call stays a memmove() (which Valgrind never flags for overlap).
The flag is plumbed through only when run_valgrind is set:

  flow-linux.yml (--build-arg VALGRIND) -> Dockerfile.jammy (ARG VALGRIND)
  -> install_redis.sh (-U_FORTIFY_SOURCE)

All other builds (other OSes, sanitizer, non-Valgrind jammy) are
unchanged and keep fortification. Redis stays optimized; no source change
and no Valgrind suppressions needed.

* unite make build and make install into single line

* MOD-16160 -  wake parked TS.BGET clients on key deletion (#2062)

* fix(bget): wake parked TS.BGET clients on key deletion

Nightly CI was hitting the 6h job timeout on a random x64 distro per
run. Root cause: TS.BGET clients parked on a key are never woken when
the key is removed (DEL/FLUSHALL/expire/eviction) — they wait out their
user-supplied timeout, and the test helper's daemon threads kept the
connection (and the test process) alive long enough to trip the GHA
cancel.

Fix:
- src/tsdb.c: SignalKeyAsReady in FreeSeries — fires on every key
  removal path, no new bookkeeping.
- src/module.c: TSDB_bget_reply_callback probes the key; if it's gone,
  reply empty (require_full_batch=false) instead of re-parking.

Test hardening (tests/flow/test_ts_bget.py):
- BGET timeouts 10_000 ms → 2_000 ms.
- _start_bget sets a socket_timeout and closes the connection in
  finally, so a stuck worker cannot outlive its socket.

* change RedisModule_BlockClientOnKeys  RedisModule_BlockClientOnKeysWithFlags so deleted key will be signaled as well

* add tests to examine the key del behaviour

* increas timeout

* fix remarks

* use RedisModule_KeyExists instead of opening the key

* ci: bump GitHub Actions to Node24-compatible versions (#2035)

* ci: bump GitHub Actions to Node24-compatible versions

GitHub is removing Node20 from runners on 2026-06-16 (default switch to
Node24), with full removal in fall 2026.
See https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/

Bumps to the lowest Node24-compatible major for each action:

- actions/checkout@v4 → v5
- actions/upload-artifact@v4 → v6 (v5 is still node20)
- actions/download-artifact@v4 → v7 (v5/v6 are still node20)
- actions/setup-python@v5 → v6
- aws-actions/configure-aws-credentials@v4 → v6 (v5 is still node20)
- release-drafter/release-drafter@v5 → v7 (v6 is still node20)
- korthout/backport-action@v3 → v4
- actions/create-github-app-token@v1 → v3

Not changed:
- DanielTamkin/[email protected] — only ships node12, no Node24 release
  available. The action is simple enough to inline if it becomes an issue.
- rojopolis/[email protected] — docker action, unaffected.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* ci: drop env GITHUB_TOKEN, set release-drafter v7 token input

release-drafter v7 dropped Probot and no longer reads GITHUB_TOKEN from
the environment. Pass the secret via the `token` input instead.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>

* MOD-15749 Short-form CLUSTERSET: RAMP capability + LibMR error-return (#2065)

* MOD-15749 Advertise short_form_clusterset capability in RAMP manifest

Add `short_form_clusterset` to the module's RAMP capabilities so Redis
Enterprise / DMC can discover that this build accepts the zero-arg short
form of CLUSTERSET (which relies on RedisModule_GetClusterNodeSlotRanges),
instead of inferring support from the module patch version.

Pairs with the LibMR change that makes the short form return an error when
the slot-ranges API is unavailable, so a capability-aware caller can gate the
short form up front and a capability-unaware one can still try-then-fallback.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* MOD-15749 Bump LibMR pin to short-form CLUSTERSET error-return fix

Pin deps/LibMR to the branch commit that makes the short form of CLUSTERSET
reply with an error (instead of a silent +OK) when RedisModule_GetClusterNodeSlotRanges
is unavailable -- RedisGears/LibMR#99.

This pairs with the short_form_clusterset RAMP capability in this PR: a
capability-aware caller (DMC) gates the short form up front; a capability-unaware
one can try the short form and fall back to the long form on the error.

Temporary pin to the PR branch commit; re-pin to LibMR master once #99 merges.

Verified locally on Redis 8.2.1 (which lacks the slot-ranges API): short-form
timeseries.CLUSTERSET now replies "ERRCLUSTER Failed to set cluster topology"
and logs the API-missing warning, instead of replying +OK.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* MOD-15749 Re-pin LibMR to master after #99 merged

RedisGears/LibMR#99 (short-form CLUSTERSET returns an error when the
slot-ranges API is missing) merged to master as a37b672. Move deps/LibMR
from the temporary PR-branch pin to LibMR master HEAD, which also picks up
the intervening master commits #96 (Linux SSL CI hang / testUnevenWork
timeout fix) and #98 (detect oss cluster at MR_ClusterInit).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>

* ci: speed up Event CI (lean PR gate) and shard slow nightly jobs (#2068)

* ci: shard valgrind tests across parallel runners

The full valgrind PR run executes all five test topologies (general,
slaves, AOF, AOF+slaves, OSS cluster) sequentially in a single job,
taking ~4h on a standard runner — unworkable as a PR gate.

No larger x64 runner is provisioned for the org (tracked in CTOI-224)
and a job targeting ubuntu-latest-64-cores is never picked up, so
rather than wait on a bigger box, shard the valgrind job by topology:
setup-environment expands the matrix to one job per topology when
run_valgrind is set, and each job runs exactly that topology. This
spreads the ~4h across 5 standard ubuntu-latest runners (~5x wall-clock
reduction) with no infra changes.

Non-valgrind builds are unchanged (one entry per OS); sanitizer is
unaffected. Result/artifact names are suffixed with the topology so the
five shards stay distinct.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* ci: make PR gate lean (quick + macOS build-only)

The PR Event CI was a near-copy of the nightly: it ran the full 5-topology
suite across the entire 18-OS x64 + 17-OS arm64 + 6-macOS matrix plus
sanitizer on every PR. macOS (serial, PARALLEL=0, unshardable) was the
~177m wall-clock pole.

Adopt redis/redis's tiered model — lean PR gate, exhaustive nightly:
- build-linux-x64 / -arm64: quick=true on PR (GEN topology only).
- linux-sanitizer: quick=true on PR (ASAN, GEN only).
- macOS: compile-only smoke on PR via a new build_only input to
  flow-macos.yml that skips Run tests / Pack / S3 upload.
- linux-valgrind unchanged: it is already topology-sharded across 5
  runners (commit 3082e28), so all topologies still run on PR (~45m)
  and become the new, much lower PR pole.

event-nightly.yml and event-tag.yml don't pass build_only and keep
quick=false, so full topology + macOS test coverage is preserved there.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* ci: shard the nightly sanitizer by topology

The sanitizer (ASAN) job ran all five topologies in a single ~49m job.
Reuse the valgrind topology-sharding path so the sanitizer also fans out
to one runner per topology, cutting its wall-clock to roughly the slowest
single topology (~18-25m).

The matrix-expansion gate now triggers for run_sanitizer as well, but is
guarded by quick \!= true: QUICK=1 forces GEN-only in tests.sh, so sharding
a quick run would just duplicate the GEN topology across five jobs. This
keeps the lean PR sanitizer (quick=true) a single GEN job while the nightly
sanitizer (quick=false) shards. PR/nightly valgrind behaviour is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* ci: run valgrind nightly-only, not on the PR gate

Following redis/redis: valgrind runs in the nightly only, and PRs rely on
ASAN (already in event-ci) for memory-bug coverage. Even sharded across 5
topology runners, valgrind was the ~45m PR wall-clock pole; dropping it
from the PR gate lets PRs finish in ~15-20m. Full 5-topology valgrind
coverage is unchanged in event-nightly.yml. Valgrind-class regressions now
surface in the nightly rather than on the PR.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* ci: PR gate runs full tests on one OS/arch + build-only smokes

Addresses review: the lean PR gate ran GEN-only everywhere, which skipped
the OSS-cluster / LibMR flow on PRs. Restore full coverage on the PR while
keeping it fast:

- event-ci runs the FULL suite (all five topologies, incl. OSS cluster) on
  one OS per arch (jammy x64 + jammy arm64), topology-sharded via the new
  shard_topologies input so the variants run in parallel (~15-20m).
- The other OSes are dramatically reduced to a small, toolchain-diverse
  compile-only smoke set (alpine/amazonlinux/mariner2/rocky9) via a new
  build_only input to flow-linux.yml. The full 18-OS test matrix stays in
  event-nightly.

flow-linux.yml:
- build_only: skip Run tests / Capture / Pack / S3, build the module only.
- shard_topologies: expand a full (quick=0) run to one job per topology
  without needing valgrind/sanitizer. Pack/S3 now also skip topology shards
  so the sharded full-test job doesn't pack/upload five times.
- Move setup-environment inputs (arch, os, quick, run_*, shard) into env
  vars instead of interpolating them in run blocks (fixes the script-
  injection finding flagged by code scanning).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* ci: reduce macOS variants on the PR gate to one per arch

The PR gate ran all six macOS variants as build-only smokes; over the last
14 runs (84 macOS jobs) none of them failed, so six compile-only macOS jobs
per PR is pure overhead. Run a reduced set on PRs — macos-15 (arm) and
macos-26-intel (intel, incl. the special macos-26 SDK path) — covering both
architectures and the newest SDK. The full six-variant macOS matrix still
runs in event-nightly (and event-tag).

flow-macos.yml now accepts a space-separated os list (previously a single
override only), and reads it via an env var instead of interpolating the
input into the run block.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* ci: use azurelinux3 instead of mariner2 in the PR smoke set

Azure Linux 3.0 is the current successor to CBL-Mariner 2.0, so it is the
more relevant Microsoft distro to compile-smoke on PRs. mariner2 still
builds in the full nightly matrix.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* ci: PR gate — newest-only macOS + full-topology ASAN

Two PR-gate refinements (both in event-ci.yml):

- macOS smoke runs the newest macOS only, one per arch: macos-26 (arm) +
  macos-26-intel (intel), instead of macos-15 + macos-26-intel.

- linux-sanitizer drops quick (was GEN-only, ~7.5m) and runs the full
  topology suite under ASAN, sharded one topology per runner via the
  existing shard gate (run_sanitizer + quick=false). Measured: ASAN ≈
  non-ASAN for TS, so each ASAN shard lands ~at the full-test pole (~15m) —
  this adds replication / AOF / cluster / LibMR ASAN coverage on every PR
  without raising the overall PR wall-clock.

The full 6-variant macOS matrix still runs nightly.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>

* MOD-6409 - TS.INFO memoryUsage (and MEMORY USAGE, via the mem_usage callback) (#2067)

* TS.INFO memoryUsage (and MEMORY USAGE, via the mem_usage callback)
under-reported per-key memory, leading to wrong capacity estimates when
prospects size one series and multiply by the planned key count.

Resolves the two remaining items of MOD-6409:

- #7 key name: count series->keyName, a value-owned RedisModuleString
  allocation that was never included.

- #6 label index: add IndexMemUsage(), which estimates a series' share of
  the global label index — the per-key inverse-index dict (tsLabelIndex)
  in full, plus a 1/N slice of each shared labelsIndex leaf. Apportioning
  shared leaves by entry count keeps the property that summing over all
  keys counts the index exactly once. Dict sizes use MallocSizeDict, so
  the figure is an estimate.

* add comment that indicate that the labels->series mapping effect the size mem usage of key and in may change upon other keys change

* add some tests

* MOD-16266 - fix ci hang  (#2066)

* fix(tests): bound blocking waits in flow tests to prevent CI hangs

Several flow tests could block indefinitely when a dependency stalled
(a never-replying shard, an unacked replica, a node that never joins),
running into the 6h CI job timeout instead of failing. Add finite,
Valgrind-aware bounds to every such wait:

- includes.py: HANG_TIMEOUT_SECS (60s / 600s under vg) and
  WAKE_TIMEOUT_SECS (5s / 30s); deadline on verifyClusterInitialized.
- test_ts_libmr_failiure.py: daemon worker threads + bounded joins,
  cluster-init deadline.
- test_asm.py: socket_timeout on the migration-validator connection.
- test_ts_madd.py: finite WAIT timeout (was 0 = infinite).
- test_ts_bget.py: scale wake-test block/join/assert timeouts via
  WAKE_TIMEOUT_SECS so Valgrind's slower wake can't false-fail.

Bounds are generous enough that a healthy (even slow Valgrind) run
always finishes first; they fire only on a genuine stall, with a
[HANG-GUARD] log line pinpointing the culprit.

* try to find the hang test

* add test timeout

* increase timeout to 10 min

* increase timeout to 1800

* fix(tests): import Env from includes in range_empty_filter_stress

Avoids terminateRetries=None (raw RLTest.Env), which made env teardown
wait forever for the replica on SIGTERM and hang until the test timeout.

* revert unnecessary changes

* increase the timout for VG fo 3 hours

* fix(tests): use includes.Env in all test files to prevent teardown hangs

Raw 'from RLTest import Env' creates runners with terminateRetries=None.
RLTest reuses env runners across compatible tests, so any file with the
raw import poisons the runner — teardown then waits forever for the slave
to exit instead of escalating to SIGKILL after ~20s. Fixed all remaining
17 files.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

---------

Co-authored-by: Claude Sonnet 4.6 <[email protected]>

* MOD-15565 -  mrange aggregation execution in inner shards (#2074)

* applly agg in the inner shards when no groupby requested - mrange

* make all the agg be done in the inner shard

* add tests

* clean groupby from inner shard

* add tests

* add some more tests

* tests rename

* squash

* fix multi agg as well

* formatting

* use redismodule api for responding

* add skip aggregation flag

* replace malloc with calloc

* try to fix the fail tests

* zero timestamps for cases where aggregation already being executed in the inner shard

* fix tests

* use anew command for the inner shard with aggregation

* add flow test that check version missmatch

* fix tests

* fix

* tests: use Redis 8.8 binary for old-module nodes in mixed-version cluster test

Build Redis 8.8.0 from source in a parallel thread alongside the origin/master
module build. Old nodes run with the 8.8 redis-server binary whose module API
matches origin/master's own deps/RedisModulesSDK headers — no header patching
needed. New coord continues to use the CI's unstable redis-server.

Also exposes OLD_REDIS_SERVER env var so CI can inject a pre-built binary and
skip the clone+build step.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* fix remarks

* fix: clang-format violation in aggTypes validation

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* fix: route TS.MRANGE through direct shard connection in stride test

Cluster client (getClusterConnectionIfNeeded) can't route multi-key
commands without a slot; use getConnection(1) for reads, matching the
pattern of all other cluster MRANGE tests.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* remove the new flow that supposed to handles upgrade version missmachine

* fix: restore FILTERBY for plain MRANGE queries in cluster mode

RangeArgsSkipReAggregation clears filterByTS/filterByValue args because
shards already applied those filters during pre-aggregation.  After the
unconditional call, FILTERBY was silently dropped for non-aggregation
queries (where shards return raw samples and the coordinator must filter).

Guard the call on aggregationArgs.numClasses > 0 so non-aggregation
paths keep the original args and FILTERBY is applied correctly.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* fix: FILTERBY is always applied by coordinator, not shards

RangeArgsSkipReAggregation was incorrectly clearing filterByTSArgs and
filterByValueArgs.  FILTERBY is always a coordinator-side operation, so
clearing those args caused FILTER_BY_VALUE and FILTER_BY_TS to be silently
dropped in cluster mode for all MRANGE queries.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* fix: restore FILTERBY routing split between coordinator and shards

For aggregation queries, shards pre-aggregate and apply FILTERBY per-series
before the coordinator reduces them.  Re-applying FILTERBY at the coordinator
after GROUPBY+REDUCE corrupts results because the reduce changes the values.

For plain (non-aggregation) queries, shards return raw samples and the
coordinator must apply FILTERBY itself.

Gate RangeArgsSkipReAggregation on aggregationArgs.numClasses > 0 so each
path gets the correct behaviour, matching the original split-command design.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* fix: shards always apply FILTERBY, coordinator never re-applies it

Previously FILTERBY was only propagated to the shard's mrangeArgs when
numAggClasses > 0.  For plain (non-aggregation) queries the shard skipped
it, forcing the coordinator to apply it — but the coordinator's
RangeArgsSkipReAggregation was already clearing those args for all queries,
so FILTERBY was silently dropped.

Move filterByValueArgs/filterByTSArgs assignment outside the aggregation
block in TS_INTERNAL_MRANGE_impl so shards always filter.  The coordinator
then unconditionally skips FILTERBY via RangeArgsSkipReAggregation, which
is correct for all paths including GROUPBY+REDUCE.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* fix: clamp ParseSeriesAllAggs numAgg to minNumAgg floor

When a populated key's first sample has fewer elements than the
shard-wide minNumAgg (determined by SeriesListReplyParser's first
pass), the unconditional overwrite could drop numAgg below the floor,
producing fewer Series entries than expected and breaking the fixed
stride in mrange_done_internal.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* chore: revert deps/LibMR to master's commit

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* reverted libmr change

---------

Co-authored-by: Claude Sonnet 4.6 <[email protected]>

* MOD-16505 - change TS.BGET command to TS.READ (#2081)

* Rename TS.BGET to TS.READ with updated blocking syntax

## Motivation

TS.BGET used a required positional `timeout` argument, with timeout=0
meaning "do not block". This conflated two distinct concepts (blocking
vs. timeout duration) in a single value, and made the non-blocking
case look like a degenerate timeout rather than an intentional choice.

## Syntax change

  Old: TS.BGET key timestamp timeout [MIN_COUNT min_count] [MAX_COUNT max_count]
  New: TS.READ key timestamp [BLOCK milliseconds min_count] [MAX_COUNT max_count]

Key differences:
- Blocking is now opt-in via the optional BLOCK keyword. Omitting BLOCK
  returns immediately (non-blocking), consistent with how TS.XREAD and
  other Redis blocking commands express the distinction.
- `milliseconds` and `min_count` are grouped together inside BLOCK,
  making the relationship explicit: both only apply when blocking.
- `BLOCK 0 min_count` means block forever (Redis convention: BLPOP,
  XREAD BLOCK 0), freeing `timeout=0` from its overloaded meaning.
- `MIN_COUNT` is no longer a standalone optional keyword; it is a
  required positional argument inside the BLOCK group.
- `MAX_COUNT` remains an independent optional keyword, unchanged.
- Minimum arity drops from 4 to 3 (timeout was previously required).

Valid argc values: 3, 5 (MAX_COUNT only), 6 (BLOCK only), 8 (both).

## Implementation

- `ReadCtx` gains an explicit `bool blocking_req` field. `timeout_ms`
  is now a plain non-negative value meaningful only when `blocking_req`
  is true. The previous sentinel (`-1LL`) is removed entirely.
- `parse_read_args` detects BLOCK/MAX_COUNT presence first, computes
  the expected argc from named constants (READ_BLOCK_TOKENS,
  READ_MAX_COUNT_TOKENS), and rejects mismatches with WrongArity.
- The fast-path dispatch in `TSDB_read` uses `args.blocking_req` to
  choose between flush mode (non-blocking, always replies immediately)
  and strict mode (blocking, parks the client if min_count not yet met).
- All internal identifiers renamed: TSDB_bget* → TSDB_read*,
  BGetCtx → ReadCtx, BGET_* → READ_*.

## Files changed

- src/module.c: core rename + parse/dispatch logic rewrite
- src/cmd_info/ts_info.c: arg schema updated (arity -4 → -3, BLOCK
  group replaces positional timeout + MIN_COUNT keyword)
- commands.json: entry renamed, argument structure updated
- tests/flow/test_ts_bget.py → test_ts_read.py: all call sites updated
  to new syntax; bad_argv test rewritten for new validation paths;
  non-blocking test updated (no BLOCK = immediate return)

* enhance tests

* formatting

* fix remarks

* MOD-14615: run valgrind test suite serially to avoid CPU oversubscription (#2083)

test_asm_with_data_and_queries_during_migrations flaked on the valgrind oss_cluster
nightly with a multi-shard max-idle ("did not reply within the given timeframe").

Root cause: the hosted runner runs the flow suite at --parallelism nproc, and each
redis-server is ~30x slower under valgrind, so many concurrent test clusters
oversubscribe the CPU -- a shard gets starved past LibMR's 5s max-idle during
migration churn. Not a product bug: in production each shard has its own core, so 5s
is ample. macOS already runs serially for a similar reason.

Run valgrind serially (PARALLEL=0) so each shard gets a core and the default 5s holds.
Verified: with PARALLEL=0 the valgrind oss_cluster shard went 435/435 green at the
default 5s (run 28498734942), no timeout change.

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>

* MOD-14615: skip test_asm migration-query test on macos-15-intel (#2084)

test_asm_with_data_and_queries_during_migrations occasionally fails on the
macos-15-intel nightly runner: it gets LibMR's 5s max-idle ("did not reply
within the given timeframe") instead of the expected "Query requires
unavailable slots", tripping the assert at test_asm.py:70.

Root cause is runner speed, not a product bug -- macos-15-intel is the
slowest/oldest hosted Intel box; the other 5 macOS runners (incl. macos-26-intel)
and all Linux topologies pass the same test. macOS already runs serially, so the
valgrind-oversubscription fix (#2083) doesn't apply here.

Export the matrix runner label as RUNNER_LABEL and skip only this one test on
macos-15-intel. Coverage is preserved everywhere else.

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>

* MOD-16299 - NRANGE support multiple aggregations (#2079)

* nrange support multi agg

* add some tests

* formatting

* flatten response for multi arggs

* save

* nrange cp inly inner agg

* fix the bad indexing

* formatting

* code review

* fix remarks

* fix remarks

* test the cross slot error

* fix remarks

* MOD-16514 - fix bootstrap & build for all os (#2082)

* install aws if and only if it is not installed yet

* add another build fixes

* fix build for amazonlinux2

* fix(al2): add cc symlink to devtoolset-11 to fix LTO version mismatch

* alma8 +rhel8+rhel9+bionic +focal passes

* fix for bionic

* fix

* fix the bionix botstrap

* bionic fix

* fix for bullesye

* fix for focal

* fix focal

* fix for focak

* fix for bionic & focal

* fix for focal

* fix remarks

* fix remarks

* try another methood

* MOD-16653 Prevent more  heap overflow + other rdb load asserions (#2086)

* MOD-16172 - support exclude empty in mrange commands (#2072)

* add EXCLUDEEMPTY flag to TS.MRANGE / TS.MREVRANGE

Filtering is applied per inner shard (not the coordinator), consistent
with how aggregation and FILTERBY are handled. The standalone path
filters in replyUngroupedMultiRange. EXCLUDEEMPTY and GROUPBY are
mutually exclusive.

* fix remarks

* aplly changes to make the check fo empty series more effiecient

* dix code remarks

* add to command info

* ci: add code coverage to CI — PR + nightly (lcov -> Codecov) (#2070)

* ci: add code-coverage job to the nightly (lcov -> Codecov)

The repo already has the coverage plumbing (`make coverage`, COV=1 -> gcov,
codecov.yml, lcov in the build image) but it was never wired into CI. Add a
nightly coverage job:

- New reusable flow-coverage.yml: builds the jammy image, runs
  `make coverage COV=1 QUICK=1` (instrumented build + GEN tests + lcov collect
  -> bin/<platform>/cov.info), then uploads the report to Codecov via
  codecov/codecov-action@v5 and keeps a cov.info artifact.
- event-nightly.yml gains a `coverage` job that calls it, gated by the repo
  variable ENABLE_CODE_COVERAGE (defaults on; set to 'false' to disable).

COV=1 is passed at the top level on purpose: the lcov reset/collect macros in
readies/mk/coverage.defs are guarded by `ifeq ($(COV),1)`, so without it the
build is instrumented but no report is collected.

Coverage is nightly-only (instrumented build is slow) — the PR gate stays lean.
CODECOV_TOKEN is passed explicitly (not via `secrets: inherit`) to the reusable
workflow.

Requires repo config: CODECOV_TOKEN secret (for uploads) and, optionally, the
ENABLE_CODE_COVERAGE variable.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* ci: also run coverage on the PR gate (Codecov diff comment)

Mirror RedisJSON: run the coverage job on event-ci too, not just nightly, so
Codecov posts a per-PR diff-coverage comment. Gated to skip draft PRs and the
ENABLE_CODE_COVERAGE='false' toggle.

flow-coverage.yml now checks out with fetch-depth: 0 so Codecov can resolve the
PR base for accurate diff coverage.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>

* fix(alpine): use distro python3 for the test venv (avoid uv musl clang standalone) (#2089)

setup-python.sh's uv venv otherwise downloads uv's standalone musl CPython,
which is clang-built and bakes --rtlib=compiler-rt into its sysconfig; sdist-
only test deps lacking musl wheels (psutil via rltest) then fail to compile
with Alpine's gcc. Pin SETUP_PYTHON_VERSION to Alpine's own python3 (installed
with python3-dev) and forbid uv downloads. Mirrors the EL8 python pin.

Co-authored-by: Claude Fable 5 <[email protected]>

* MOD-16370 Introduce `TS.QUERYLABELS`: Get a list of labels and label-… (#2090)

* MOD-16370 Intreduce `TS.QUERYLABELS`: Get a list of labels and label-values

* CR + Format

* fix test

* CR

* CR

* format

* CR

* format

* use try calloc

* add GEARS protocol support

* MOD-16873 `TS.INCRBY` replicate master timestamp when timestamp is lo… (#2109)

* MOD-16873 `TS.INCRBY` replicate master timestamp when timestamp is local server clock

* .

* MOD-16306 - use registry for pulling / pushing docker images  (#2098)

* upload imagw to registry patch

* add new flow to push image to registry

* dix runner

* push the image to time series

* rename dir

* change the flow-linux.yml
so jammy job will pull image instead of building it

* fix auth

* remove pull request path

* full linux matrix

* fix

* patch: trigger on PR

* fix

* fix naming

* fixed

* updater the trigger path

* update the tag name flow

* fix remarks

* re run job

* use docker-image_version in ramp.yml file to identify image version (#2094)

* test: add local brnach to the push images checkk

* (test): new PR will not release existing image

* make it runs if change in the version

* fix remarks

* fix remarks

* fix the flow to meet the new requirments

* fix remarks

* MOD-16364 - update requirements deps (#2108)

* squash

* try to fix the apt hangup

* fix ubuntu hangs  (#2115)

* change to 4 parralel jobs

* test

* unite build and push

* revert patchs

* MOD-16382 Handle topology-change notifications (#2104)

* MOD-16382 Handle topology-change notifications

Cleanup - remove a stale function that was used for the (no longer supported) ts-global-password config

* Use l&g version of modules sdk

* Added a log-only cluster-topology callback

* Use version of libmr from a side branch

* Added the actual call to the topology update + format

* Use the updated version of libmr from a side branch

* add ts-topology-events config to gate topology-change subscription

* Disable the subscription on topology changes in tests that are designed for the older (command-based) changes

* update to libMR master

---------

Co-authored-by: Tom Gabsow <[email protected]>
Co-authored-by: Tom Gabsow <[email protected]>

* MOD-16382 Add topology-change flow tests (consolidated) (#2116)

* MOD-16382 Additive topology-change tests

Now that the MOD-16382 module code + ts-topology-events config landed on master
(#2104), this PR carries only the net-new tests:

- tests/flow/test_topology_changes.py: 7 non-cluster CLUSTERSET reconcile tests
  (slot-range move, node add/remove, ip/port change, repeated-identical stability).
- tests/flow/test_asm.py: three functions exercising the topology-change auto-refresh
  path -- ..._auto_notified (query converges through churn, tolerating both transient
  errors), ..._converges_after_persistent_reshard (lasting reshard self-heals with no
  manual refresh), and ..._manual_refreshcluster_after_persistent_reshard (the
  ts-topology-events=no backwards-compat mirror).

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* MOD-16382 Add topology-change notification flow tests

Add tests/flow/test_ts_topology_notifications.py, consolidating the
topology-change-notification coverage (and the leaks it exercises) alongside
the other topology tests on this branch:

- test_topology_notifications_establish_connections: configure the cluster
  purely via ClusterTopologyChange notifications (skipRefreshCluster) and
  assert every inter-shard connection reaches 'connected' via TS.INFOCLUSTER
  without any prior fan-out command. Deterministic MOD-16951 guard: it fails
  while the inter-shard connections are only warmed lazily and passes once
  they are established eagerly off the topology-install path.
- test_first_multishard_query_after_topology_setup: a first cold-coordinator
  TS.QUERYINDEX must return the full result promptly; the client uses an
  explicit socket timeout so a silent max-idle hang surfaces as a TimeoutError.

Both exercise the topology-rebuild / CLUSTERSETFROMSHARD paths, so they also
surface the outstanding leaks in those paths under the sanitizer build.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_012kX5PXxU9a9Q6jXRrNji9y

* MOD-16382 Move topology-change tests out of test_asm.py into test_topology_changes.py

The auto-refresh / topology-notification tests don't belong in the ASM suite.
Move them into tests/flow/test_topology_changes.py and refactor to share code
instead of each test re-deriving the same setup/validation/convergence:

- test_asm_with_data_and_queries_during_migrations_auto_notified
- test_asm_auto_refresh_converges_after_persistent_reshard
- test_manual_refreshcluster_after_persistent_reshard

Shared helpers now used by all three (and by the two persistent-reshard tests
via a single _reshard_and_converge): _oss_cluster_topology_env,
_fill_and_validate_static, _mrange_count_validator, _data_sizes, converge_query,
_my_slot_range, _middle_third, plus the _MRANGE_COUNT_CMD /
SLOT_RANGES_ERROR / TOPOLOGY_CHANGED_ERROR module constants. The ASM-specific
helpers they still need (fill_some_data, migrate_slots_back_and_forth,
import_slots, SlotRange, ClusterNode, MIGRATION_CYCLES) are imported from
test_asm rather than duplicated.

test_asm.py is restored to its previous (ASM-only) state.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_012kX5PXxU9a9Q6jXRrNji9y

* MOD-16951 Bump deps/LibMR to the inter-shard TLS fix (#111)

Pin deps/LibMR to 1aac5e5 (RedisGears/LibMR PR #111,
tom.gabsow/mod16951-tls-fix off master a6d14e8): gate OSS inter-shard TLS
on `tls-cluster yes` so the topology-event fan-out no longer opens a TLS
handshake against a peer's plaintext port. Lets this PR's CI validate the
fix against the topology-change test suite.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* MOD-16951 Bump deps/LibMR to the inter-shard TLS fix (#111)

Pin deps/LibMR to the native-view TLS gate (RedisGears/LibMR PR #111): use
inter-shard TLS only when the topology comes from the native cluster view
(GetClusterNodeInfo) and tls-cluster is yes; long-form CLUSTERSET keeps the
tls-port fallback. Lets this PR's CI run against the fix.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* MOD-16382 Bump deps/LibMR to add hardened exec-leak fix (#108) on TLS fix (#111)

Test pin: deps/LibMR -> RedisGears/LibMR tom.gabsow/rts2116-tls-leakfix
(bf33fb7) = #111 (MOD-16951 gate inter-shard TLS, already pinned) + the
hardened topology-change / idle-timeout Execution leak fix (#108). Lets the
linux-sanitizer / x64-jammy-oss_cluster leg verify the LeakSanitizer failure
is gone. Re-point to master once #111 and #108 merge.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* MOD-16382 Bump deps/LibMR to eager-connect (#110) + hardened exec-leak fix (#108)

Test pin: deps/LibMR -> RedisGears/LibMR tom.gabsow/rts2116-eagerconnect-leakfix
(f98f310aa891bb0757a44a238f69c36134c248d4) = #110 (MOD-16951 eager-connect on topology-change) + hardened
Execution leak fix (#108). Replaces the previous #111(TLS)+#108 test pin:
the failing oss_cluster leg needs eager-connect (establish_connections test),
and the TLS gate (#111) is orthogonal to the non-TLS oss_cluster leg.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* MOD-16382 Bump deps/LibMR: add HELLO use-after-free fix on topology swap

Test pin: deps/LibMR -> tom.gabsow/rts2116-eagerconnect-leakfix (0d13eaa7fafc63b19814d3dc1deb41fa0e03afba)
= #110 eager-connect + #108 hardened exec-leak fix + the MR_ClusterHello
use-after-free fix (defer the CurrCluster read to the event loop). Aims to
turn the linux-sanitizer / x64-jammy-oss_cluster leg fully green.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* MOD-16382 Bump deps/LibMR: add ClusterSetCtx leak fix (free_privdata)

Test pin: deps/LibMR -> tom.gabsow/rts2116-eagerconnect-leakfix (a0f282a46ac3a1ed278bdbafc11ebbd47102bbd5)
= #110 eager-connect + #108 hardened exec-leak fix + HELLO use-after-free fix
+ ClusterSetCtx free_privdata leak fix. Should clear the last LeakSanitizer
report on the linux-sanitizer / x64-jammy-oss_cluster leg.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* MOD-16951 Bump deps/LibMR: add the actual TLS-to-plaintext fix (#111)

Test pin: deps/LibMR -> tom.gabsow/rts2116-eagerconnect-leakfix (7e15b9462e61c3ec5ee7cbba74874a3def89248f)
now = #110 eager-connect + #108 exec-leak fix + HELLO use-after-free fix
+ ClusterSetCtx leak fix + #111 (the proven MOD-16951 checkTLS fix:
inter-shard TLS gated on tls-cluster=yes / long-form CLUSTERSET, so the
native cluster view no longer opens a TLS handshake against a peer's
plaintext port). Previous pins were missing #111 - the real MOD-16951 fix.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* MOD-16382 Drop eager-connect; pin the real topology fixes (no #110)

deps/LibMR -> tom.gabsow/rts2116-topology-fixes (041c515) = topology base +
#108 exec-leak fix + HELLO use-after-free fix + ClusterSetCtx leak fix + #111
(the real MOD-16951 checkTLS fix). NO eager-connect (#110).

Remove test_topology_notifications_establish_connections: it asserted white-box
eager pre-warming, an optional optimization, and was written on the disproven
premise that eager-connect is the MOD-16951 fix (the real fix is #111/TLS,
which RLTest can't reproduce). Keep test_first_multishard_query_after_topology_
setup as the cold-coordinator fan-out guard (passes with lazy warming + #111).

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* MOD-16382 Consolidate topology tests into one file

Merge test_ts_topology_notifications.py into test_topology_changes.py -- one
topology-tests file instead of two. The cold-coordinator first-multishard-query
test moves in as a third section (CLUSTERSET-apply, auto-refresh/reshard,
cold-fan-out); imports already cover it (Env, VALGRIND, SANITIZER, redis). No
test logic changes; 11 test cases total.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* MOD-16382 Address code-review findings on topology tests

- Skip test_first_multishard_query_after_topology_setup on macos-15-intel,
  matching _oss_cluster_topology_env: the slowest hosted runner can't reliably
  serve the cold fan-out within libmr's max-idle, so the 8s timeout could flake.
- _node_by_min: fail with a clear message instead of an opaque IndexError when
  no node owns the given min-slot.
- Remove _peer and _args (dead duplication): _peer -> _node_by_min(nodes, 8192);
  _args -> the general _clusterset_args builder, so there's one CLUSTERSET builder
  and one node-lookup helper.
- Document _infocluster_nodes' single-range-per-node assumption.

No behavior change to what the tests assert.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* MOD-16382 Unpin the LibMR memory fixes so the tests surface the issues

Point deps/LibMR at LibMR master (bd964f6 = topology-change work + the merged
TLS fix #111) instead of the fix-integration branch. Master does NOT contain the
memory-safety fixes (#108 Execution-abort leak, #113 HELLO use-after-free +
ClusterSetCtx leak), so the topology-change flow tests here exercise the leaky
abort / CLUSTERSETFROMSHARD / execution paths and the LeakSanitizer/ASAN reports
show up on the linux-sanitizer / x64-jammy-oss_cluster leg -- the point of this
PR (surface the issues; the fixes land separately in LibMR #108/#113).

The oss_cluster sanitizer leg is therefore EXPECTED red on this PR.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

---------

Co-authored-by: Claude Opus 4.8 <[email protected]>

* MOD-16265 - retry the dumpAndReload() for max 2 sec  so no "Background save already in progress to give enough time to existing rdb save to finish (#2124)

* disabling the auto rdb save so no "Background save already in progress" happens

* keep server saiving auto approach
and create a while loop in the test that waits untill there are no active rdb save

* add assert line after 2 sec

* Merge pull request #2125 from RedisTimeSeries/claude/redistimeseries-pr-2116-tests-0wmm4d

Revert topology-change flow tests from #2116

* MOD-17016 Disable topology events handling in ts under RE (for now) (#2130)

* MOD-17095 Add tls cluster tests leg (#2126)

* MOD-17095 Add tls cluster tests leg

* .

* Retrigger CI with docker-image-changes label

Empty commit to force a fresh synchronize event so CI re-evaluates
PR labels and builds the Docker image locally (BUILD_TLS=yes) instead
of pulling the stale prebuilt image.

* update libMR

* update libmr

* MOD-16382 Add flow tests for topology events (#2121)

Also:
* Refactor tests: move (and add) helpers to utils.py; also added helper dump functions for debugging
* Add topology-events flow tests and supporting helpers
* Add ts-topology-events config (immutable) and pass it to LibMR
* Fixed a UAF bug when a client is unblocked while worker still uses some of its query params
* New added_slaves_to_cluster replicas with the masters' config since LibMR doesn't do slaves correctly on clusters

* MOD-16382 Test CLUSTERSET after topology events (#2131)

Add a flow regression that verifies an obsolete short-form CLUSTERSET cannot discard topology installed by a topology event. Pin LibMR to master containing the fix from RedisGears/LibMR#119.

* squash (#2128)

* MOD-16399 Bump LibMR: skip rebuilds for unchanged CLUSTERSET topologies (#2088)

* MOD-16399 Test long-form CLUSTERSET no-op

Pin LibMR PR #104 and cover the DMC long-form topology path. Verify an identical CLUSTERSET preserves the current LibMR run ID while an endpoint change rebuilds the cluster.

* MOD-16399 Re-pin LibMR argument guard

Update the dependency to the follow-up LibMR commit that handles long-form CLUSTERSET with the lightweight argc/argv comparison while leaving short form unchanged.

* MOD-16399 Pin clean LibMR PR head

Point RedisTimeSeries at the history-cleaned LibMR #104 head. The LibMR source tree is byte-identical to the previously tested dependency commit.

* MOD-16399 Pin minimal LibMR PR head

Update RedisTimeSeries to the single-commit LibMR #104 head after reducing the dependency PR to the long-form guard and focused tests.

* MOD-16399 Pin length-aware LibMR guard

Advance LibMR to the follow-up commit that compares RedisModuleString arguments by explicit length and covers embedded NUL bytes.

* MOD-16399 Explain run ID no-op assertion

* MOD-16399 Pin merged LibMR master

Replace the temporary PR-head pin with c6a5ed62, the merged #104 commit now on LibMR master.

* change version to 8.10

---------

Co-authored-by: Tom Gabsow <[email protected]>
Co-authored-by: Claude <[email protected]>
Co-authored-by: Aviv David <[email protected]>
Co-authored-by: Gal Cohen <[email protected]>
Co-authored-by: Tom Gabsow <[email protected]>
ndyakov added a commit to redis/go-redis that referenced this pull request Jul 29, 2026
…3937)

RedisTimeSeries (RedisTimeSeries/RedisTimeSeries#2079) lets TS.NRANGE and
TS.NREVRANGE apply several aggregators to one key: each key gets its own
AGGREGATION spec token, and a spec may list multiple comma-separated
aggregators (e.g. AGGREGATION avg,max sum <bucketDuration>).

The Go API could only express one aggregator per key. Change
TSNRangeOptions.Aggregators and TSNRevRangeOptions.Aggregators from
[]Aggregator to [][]Aggregator: one spec per key, comma-joined into a
single wire token. Validation now also rejects empty specs, and the pivot
row docs describe the flattened (key, aggregator) value layout.

Breaking for the unreleased TS.NRANGE API only; matches redis-py
(redis/redis-py#4225).
YaacovHazan pushed a commit to redis/redis that referenced this pull request Oct 20, 2026
## Summary

Updates the bundled RedisTimeSeries pin in `modules/modules.yaml` from
**v8.10.0 to v8.11.90**, the **8.12 release candidate**.

| Module | From | To |
|---|---|---|
| RedisTimeSeries | v8.10.0 | v8.11.90 |

The upstream tag resolves to `ef84d314675a693998092db24b5adf8cc314d004`,
the current `8.12` release-branch head. Its source version is `8.11.90`.
RedisJSON and RedisBloom are handled separately by #15964 and #15966.

## Release notes — RedisTimeSeries 8.12 release candidate

Based on the published [`v8.11.90`
tag](https://github.com/RedisTimeSeries/RedisTimeSeries/tree/v8.11.90)
at
[`ef84d314`](RedisTimeSeries/RedisTimeSeries@ef84d31).
These notes describe the actual changes since **8.10.0**, excluding
features already backported into that release.

### Bug fixes and robustness

- **Correct replication and AOF replay for increments with labels:**
Fixed `TS.INCRBY` and `TS.DECRBY` inserting an automatically generated
`TIMESTAMP` after the `LABELS` clause, where it could be interpreted as
an extra label. Also corrected keyword detection when keys or labels
contain `TIMESTAMP` or `LABELS`, and prevented failed sample updates
from being replicated.
([#2160](RedisTimeSeries/RedisTimeSeries#2160))
- **Correct updates to large uncompressed chunks:** Fixed sample-count
truncation when inserting or updating samples in uncompressed chunks
containing more than 32,767 samples, including chunks loaded through
`RESTORE`.
([#2172](RedisTimeSeries/RedisTimeSeries#2172))
- **Safer compressed-chunk decoding:** Added bounds checks and
read-ahead padding to prevent heap over-reads when decoding malformed
compressed chunks. Validation applies to both RDB loading and
inter-shard deserialization.
([#2150](RedisTimeSeries/RedisTimeSeries#2150))
- **Stricter RDB consistency validation:** Reject serialized series with
no chunks, duplicate chunk start timestamps, overflowing sample-count
totals, or a total sample count that disagrees with the loaded chunks.
([#2189](RedisTimeSeries/RedisTimeSeries#2189))
- **Safe duplicate-policy parsing:** Fixed a potential stack overflow
when an excessively long duplicate-policy string is supplied. Valid
policy names retain their existing case-insensitive behavior.
([#2205](RedisTimeSeries/RedisTimeSeries#2205))

### Cluster reliability

- Improved cluster-type detection and inter-shard authentication
handling for Redis Enterprise deployments using OSS cluster mode.
([#2149](RedisTimeSeries/RedisTimeSeries#2149),
[LibMR #123](RedisGears/LibMR#123))
- Fixed an SSL-object memory leak when inter-shard TLS initialization
fails. ([LibMR #124](RedisGears/LibMR#124))
- Changed distributed execution-ID initialization to avoid reusing IDs
after a shard restarts.
([#2199](RedisTimeSeries/RedisTimeSeries#2199),
[LibMR #126](RedisGears/LibMR#126))

### Command metadata

- Added the missing `TS.QUERYLABELS` entry to `commands.json` for
client-generation and documentation tools. The command itself was
already available in 8.10.0.
([#2135](RedisTimeSeries/RedisTimeSeries#2135))
- Corrected `TS.CREATERULE`’s advertised minimum argument count.
([#2136](RedisTimeSeries/RedisTimeSeries#2136))
- Updated `TS.INCRBY` and `TS.DECRBY` command specifications to describe
their supported creation options accurately.
([#2160](RedisTimeSeries/RedisTimeSeries#2160))

### Testing and build maintenance

- Expanded replication-integrity, failover, topology-convergence,
TLS-failure, and corrupted-RDB regression coverage.
- Improved cluster-test startup and timeout handling, updated RLTest to
0.7.31, and removed Debian Bullseye CI jobs.
- **Updated the Homebrew OpenSSL dependency to OpenSSL 4 for macOS
builds.**
([#2213](RedisTimeSeries/RedisTimeSeries#2213),
[8.12 backport
#2215](RedisTimeSeries/RedisTimeSeries#2215))
- Added release-tag/version validation and improved artifact naming for
nightly and manual builds.
- Reduced the TLS migration-test fixture to improve CI reliability; this
change does not alter production query timeouts.
([#2212](RedisTimeSeries/RedisTimeSeries#2212))
- Set the release-candidate version to **8.11.90**.
([#2214](RedisTimeSeries/RedisTimeSeries#2214))

[Full comparison: v8.10.0 →
v8.11.90](RedisTimeSeries/RedisTimeSeries@v8.10.0...v8.11.90)

## Validation

- [x] Verified the published tag points to the intended 8.12 release
commit and matches `src/version.h`.
- [x] Verified the manifest parser resolves RedisTimeSeries to
`v8.11.90` as a tag.
- [x] Verified the diff changes only the RedisTimeSeries pin; `git diff
--check` passes.
- [ ] Upstream [tag build/test/package
workflow](https://github.com/RedisTimeSeries/RedisTimeSeries/actions/runs/38559907930)
completes (running when this PR was opened; tag-version validation
passed).
- [ ] Redis core CI validates the bundled module. A full local module
build/test was not run for this manifest-only change.

<details>
<summary>Upstream commit history for audit</summary>

This is the commit-history range, not a list of newly introduced
features: some master commits have equivalent backports in 8.10.0. The
release notes above were checked against the net source diff.

- Use dedicated redis_ref field in ramp.yml for CI git ref
([#2059](RedisTimeSeries/RedisTimeSeries#2059))
([ccdcd46e](RedisTimeSeries/RedisTimeSeries@ccdcd46))
- pass VG=1 flag to the build as well
([#2060](RedisTimeSeries/RedisTimeSeries#2060))
([062f3691](RedisTimeSeries/RedisTimeSeries@062f369))
- MOD-16160 - wake parked TS.BGET clients on key deletion
([#2062](RedisTimeSeries/RedisTimeSeries#2062))
([b1c4085d](RedisTimeSeries/RedisTimeSeries@b1c4085))
- ci: bump GitHub Actions to Node24-compatible versions
([#2035](RedisTimeSeries/RedisTimeSeries#2035))
([04cb2fce](RedisTimeSeries/RedisTimeSeries@04cb2fc))
- MOD-15749 Short-form CLUSTERSET: RAMP capability + LibMR error-return
([#2065](RedisTimeSeries/RedisTimeSeries#2065))
([8f2a3a6b](RedisTimeSeries/RedisTimeSeries@8f2a3a6))
- ci: speed up Event CI (lean PR gate) and shard slow nightly jobs
([#2068](RedisTimeSeries/RedisTimeSeries#2068))
([cfcd4e73](RedisTimeSeries/RedisTimeSeries@cfcd4e7))
- MOD-6409 - TS.INFO memoryUsage (and MEMORY USAGE, via the mem_usage
callback)
([#2067](RedisTimeSeries/RedisTimeSeries#2067))
([00c646b4](RedisTimeSeries/RedisTimeSeries@00c646b))
- MOD-16266 - fix ci hang
([#2066](RedisTimeSeries/RedisTimeSeries#2066))
([a0f71da6](RedisTimeSeries/RedisTimeSeries@a0f71da))
- MOD-15565 - mrange aggregation execution in inner shards
([#2074](RedisTimeSeries/RedisTimeSeries#2074))
([badcf8ac](RedisTimeSeries/RedisTimeSeries@badcf8a))
- MOD-16505 - change TS.BGET command to TS.READ
([#2081](RedisTimeSeries/RedisTimeSeries#2081))
([22c471ef](RedisTimeSeries/RedisTimeSeries@22c471e))
- MOD-14615: run valgrind test suite serially to avoid CPU
oversubscription
([#2083](RedisTimeSeries/RedisTimeSeries#2083))
([a48abf37](RedisTimeSeries/RedisTimeSeries@a48abf3))
- MOD-14615: skip test_asm migration-query test on macos-15-intel
([#2084](RedisTimeSeries/RedisTimeSeries#2084))
([c94501f2](RedisTimeSeries/RedisTimeSeries@c94501f))
- MOD-16299 - NRANGE support multiple aggregations
([#2079](RedisTimeSeries/RedisTimeSeries#2079))
([7d16dbd6](RedisTimeSeries/RedisTimeSeries@7d16dbd))
- MOD-16514 - fix bootstrap & build for all os
([#2082](RedisTimeSeries/RedisTimeSeries#2082))
([049d00dc](RedisTimeSeries/RedisTimeSeries@049d00d))
- MOD-16653 Prevent more heap overflow + other rdb load asserions
([#2086](RedisTimeSeries/RedisTimeSeries#2086))
([b54cdcef](RedisTimeSeries/RedisTimeSeries@b54cdce))
- MOD-16172 - support exclude empty in mrange commands
([#2072](RedisTimeSeries/RedisTimeSeries#2072))
([0d46cacd](RedisTimeSeries/RedisTimeSeries@0d46cac))
- ci: add code coverage to CI — PR + nightly (lcov -> Codecov)
([#2070](RedisTimeSeries/RedisTimeSeries#2070))
([dbb7ce4f](RedisTimeSeries/RedisTimeSeries@dbb7ce4))
- fix(alpine): use distro python3 for the test venv (avoid uv musl clang
standalone)
([#2089](RedisTimeSeries/RedisTimeSeries#2089))
([0576b6ed](RedisTimeSeries/RedisTimeSeries@0576b6e))
- MOD-16370 Introduce `TS.QUERYLABELS`: Get a list of labels and label-…
([#2090](RedisTimeSeries/RedisTimeSeries#2090))
([77b634dd](RedisTimeSeries/RedisTimeSeries@77b634d))
- MOD-16873 `TS.INCRBY` replicate master timestamp when timestamp is lo…
([#2109](RedisTimeSeries/RedisTimeSeries#2109))
([ca3375a9](RedisTimeSeries/RedisTimeSeries@ca3375a))
- MOD-16306 - use registry for pulling / pushing docker images
([#2098](RedisTimeSeries/RedisTimeSeries#2098))
([8c2f591b](RedisTimeSeries/RedisTimeSeries@8c2f591))
- MOD-16364 - update requirements deps
([#2108](RedisTimeSeries/RedisTimeSeries#2108))
([93ccac0e](RedisTimeSeries/RedisTimeSeries@93ccac0))
- fix ubuntu hangs
([#2115](RedisTimeSeries/RedisTimeSeries#2115))
([b8ff52e5](RedisTimeSeries/RedisTimeSeries@b8ff52e))
- MOD-16382 Handle topology-change notifications
([#2104](RedisTimeSeries/RedisTimeSeries#2104))
([ce8be8aa](RedisTimeSeries/RedisTimeSeries@ce8be8a))
- MOD-16382 Add topology-change flow tests (consolidated)
([#2116](RedisTimeSeries/RedisTimeSeries#2116))
([01d59afb](RedisTimeSeries/RedisTimeSeries@01d59af))
- MOD-16265 - retry the dumpAndReload() for max 2 sec so no "Background
save already in progress to give enough time to existing rdb save to
finish
([#2124](RedisTimeSeries/RedisTimeSeries#2124))
([d74df641](RedisTimeSeries/RedisTimeSeries@d74df64))
- Merge pull request #2125 from
RedisTimeSeries/claude/redistimeseries-pr-2116-tests-0wmm4d
([7ddf2ae8](RedisTimeSeries/RedisTimeSeries@7ddf2ae))
- MOD-17016 Disable topology events handling in ts under RE (for now)
([#2130](RedisTimeSeries/RedisTimeSeries#2130))
([40748fdb](RedisTimeSeries/RedisTimeSeries@40748fd))
- MOD-17095 Add tls cluster tests leg
([#2126](RedisTimeSeries/RedisTimeSeries#2126))
([3fbfae15](RedisTimeSeries/RedisTimeSeries@3fbfae1))
- MOD-16382 Add flow tests for topology events
([#2121](RedisTimeSeries/RedisTimeSeries#2121))
([fae002e8](RedisTimeSeries/RedisTimeSeries@fae002e))
- MOD-16382 Test CLUSTERSET after topology events
([#2131](RedisTimeSeries/RedisTimeSeries#2131))
([a50d901a](RedisTimeSeries/RedisTimeSeries@a50d901))
- squash
([#2128](RedisTimeSeries/RedisTimeSeries#2128))
([5944c928](RedisTimeSeries/RedisTimeSeries@5944c92))
- MOD-16399 Bump LibMR: skip rebuilds for unchanged CLUSTERSET
topologies
([#2088](RedisTimeSeries/RedisTimeSeries#2088))
([008f5a9b](RedisTimeSeries/RedisTimeSeries@008f5a9))
- MOD-17289 Suppress x86-only Valgrind false positive in MR_BuildCluster
([#2134](RedisTimeSeries/RedisTimeSeries#2134))
([bb16996d](RedisTimeSeries/RedisTimeSeries@bb16996))
- MOD-17349 Add TS.QUERYLABELS to commands.json
([#2135](RedisTimeSeries/RedisTimeSeries#2135))
([b278d809](RedisTimeSeries/RedisTimeSeries@b278d80))
- MOD-17350 Fix TS.CREATERULE advertised arity (-5 -> -6)
([#2136](RedisTimeSeries/RedisTimeSeries#2136))
([b01a5426](RedisTimeSeries/RedisTimeSeries@b01a542))
- MOD-17281 Fix test_failover timeouts and hang
([#2138](RedisTimeSeries/RedisTimeSeries#2138))
([b04f067a](RedisTimeSeries/RedisTimeSeries@b04f067))
- MOD-16600 Read INFOCLUSTER status from the end, not index 17
([#2144](RedisTimeSeries/RedisTimeSeries#2144))
([9e24dabd](RedisTimeSeries/RedisTimeSeries@9e24dab))
- MOD-17518 Use refined cluster types (allow RE+oss bdbs)
([#2149](RedisTimeSeries/RedisTimeSeries#2149))
([0cc05c78](RedisTimeSeries/RedisTimeSeries@0cc05c7))
- MOD-17239 gorilla decoder guard over-read
([#2150](RedisTimeSeries/RedisTimeSeries#2150))
([36c13128](RedisTimeSeries/RedisTimeSeries@36c1312))
- MOD-17209 Port missing topology-event tests and hunt for UAFs
([#2137](RedisTimeSeries/RedisTimeSeries#2137))
([44d103be](RedisTimeSeries/RedisTimeSeries@44d103b))
- smarter soloution
([#2151](RedisTimeSeries/RedisTimeSeries#2151))
([77270d3a](RedisTimeSeries/RedisTimeSeries@77270d3))
- MOD-17566 - add new stage to tag flow to verify tag version miss match
([#2152](RedisTimeSeries/RedisTimeSeries#2152))
([f7d32579](RedisTimeSeries/RedisTimeSeries@f7d3257))
- MOD-16873 Fix TS.INCRBY/TS.DECRBY replicating a bogus TIMESTAMP label
with LABELS
([#2160](RedisTimeSeries/RedisTimeSeries#2160))
([4f26b4cb](RedisTimeSeries/RedisTimeSeries@4f26b4c))
- MOD-17281 Tolerate connection reset during demotion in test_failover
([#2162](RedisTimeSeries/RedisTimeSeries#2162))
([6863942c](RedisTimeSeries/RedisTimeSeries@6863942))
- MOD-18192 - leak ssl in cluster err
([#2163](RedisTimeSeries/RedisTimeSeries#2163))
([dc0f1a00](RedisTimeSeries/RedisTimeSeries@dc0f1a0))
- MOD-17439 Better handling of timeouts
([#2164](RedisTimeSeries/RedisTimeSeries#2164))
([783eebfb](RedisTimeSeries/RedisTimeSeries@783eebf))
- MOD-18488 - Fix signed truncation in uncompressed upsert after RESTORE
([#2172](RedisTimeSeries/RedisTimeSeries#2172))
([7c06d521](RedisTimeSeries/RedisTimeSeries@7c06d52))
- Remove Bullseye from automation testing matrices
([#2181](RedisTimeSeries/RedisTimeSeries#2181))
([70a37c2b](RedisTimeSeries/RedisTimeSeries@70a37c2))
- MOD-18589 - Reject inconsistent sample counts in RDB loads
([#2189](RedisTimeSeries/RedisTimeSeries#2189))
([a65a01a7](RedisTimeSeries/RedisTimeSeries@a65a01a))
- MOD-18751 / MOD-18906 / MOD-18913: bring the oss-cluster flow tests
back
([#2194](RedisTimeSeries/RedisTimeSeries#2194))
([9487ceef](RedisTimeSeries/RedisTimeSeries@9487cee))
- MOD-18948: verify every write command replicates to the replica
([#2201](RedisTimeSeries/RedisTimeSeries#2201))
([0f34e70c](RedisTimeSeries/RedisTimeSeries@0f34e70))
- build: pin Homebrew OpenSSL 3 on macOS
([#2200](RedisTimeSeries/RedisTimeSeries#2200))
([853c9905](RedisTimeSeries/RedisTimeSeries@853c990))
- MOD-18801 Bump deps/LibMR to its latest version
([#2199](RedisTimeSeries/RedisTimeSeries#2199))
([fbcbd40b](RedisTimeSeries/RedisTimeSeries@fbcbd40))
- MOD-17236 - dup policy string length capping
([#2205](RedisTimeSeries/RedisTimeSeries#2205))
([feaf6bc2](RedisTimeSeries/RedisTimeSeries@feaf6bc))
- MOD-18948: check clock rows by what the replica receives, not by
timing
([#2207](RedisTimeSeries/RedisTimeSeries#2207))
([d47c979c](RedisTimeSeries/RedisTimeSeries@d47c979))
- MOD-18475 Check promoted nodes against current Redis topology
([6060574b](RedisTimeSeries/RedisTimeSeries@6060574))
- MOD-18443 Enable server logs for TLS initialization regression
([b9f97109](RedisTimeSeries/RedisTimeSeries@b9f9710))
- MOD-18475 Refresh all node views throughout failover convergence
([11390b56](RedisTimeSeries/RedisTimeSeries@11390b5))
- MOD-19365 Use released RLTest 0.7.31 for module tests
([28cd329c](RedisTimeSeries/RedisTimeSeries@28cd329))
- CI: bound test-container loopback MSS with MTU 1500
([e3c403ad](RedisTimeSeries/RedisTimeSeries@e3c403a))
- MOD-17216: replace CI MTU workaround with 60-second query idle timeout
([a01ca70a](RedisTimeSeries/RedisTimeSeries@a01ca70))
- MOD-17216: use requested 10-second distributed query idle limit
([386d2c9b](RedisTimeSeries/RedisTimeSeries@386d2c9))
- MOD-17216 Use response progress timeouts for distributed range queries
([00ad114f](RedisTimeSeries/RedisTimeSeries@00ad114))
- MOD-17216: reduce migration query fixture instead of changing timeouts
([1f0daea0](RedisTimeSeries/RedisTimeSeries@1f0daea))
- MOD-17216: reuse smaller migration fixture for TLS runs
([51adf485](RedisTimeSeries/RedisTimeSeries@51adf48))
- Prepare RedisTimeSeries 8.12 release candidate 8.11.90
([a2448196](RedisTimeSeries/RedisTimeSeries@a244819))
- update openssl dep to version 4 on brew
([#2213](RedisTimeSeries/RedisTimeSeries#2213))
([4bb5b630](RedisTimeSeries/RedisTimeSeries@4bb5b63))

</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants