Skip to content

Fix integer overflow in SORT BY/GET pattern key substitution - #5146

Merged
madolson merged 2 commits into
valkey-io:unstablefrom
madolson:promote/fix-sort-pattern-length-overflow
Nov 4, 2026
Merged

madolson merged 2 commits into
valkey-io:unstablefrom
madolson:promote/fix-sort-pattern-length-overflow

Conversation

@madolson

Copy link
Copy Markdown
Member

SORT and SORT_RO kept the prefix, element, and postfix lengths in lookupKeyByPattern() (src/sort.c:72) as int. When the substituted element is ≥ 2^31 bytes, assigning sdslen(element) to int wraps to a negative value; the sum passed to createStringObject() sign-extends to ~2^64 as size_t, and the allocator aborts the process. Changing the four variables to size_t keeps the arithmetic in the unsigned domain.

AI generated details

Problem

lookupKeyByPattern() builds the substituted key name by concatenating the prefix, element, and suffix of the pattern around *. The four lengths were int:

// src/sort.c:72
int prefixlen, sublen, postfixlen, fieldlen;

sublen is assigned from sdslen(element), which returns size_t. A set or list member of ≥ 2^31 bytes silently wraps to a negative int. The sum prefixlen + sublen + postfixlen is then negative; passed to createStringObject(NULL, len) where len is size_t, sign extension produces ~2^64. zmalloc calls abort.

For pattern weight_* with a 2^31+1-byte element: prefixlen = 7, sublen = (int)2147483649 = -2147483647, sum = -2147483640, (size_t)(-2147483640) = 0xFFFFFFFF80000008 ≈ 1.8 × 10^19.

Every code path through sortCommandGeneric() that calls lookupKeyByPattern() is affected: SORT BY, SORT GET, SORT_RO BY, SORT_RO GET, and GET x->field hash lookup.

Introduced by 3c25c4a ("lookupKeyByPattern() used by SORT GET/BY rewritten", 2012-04-17), which replaced a fixed 1024-byte stack buffer (and its size guard if (sdslen(spat)+sdslen(ssub)-1 > REDIS_SORTKEY_MAX) return NULL) with heap allocation, keeping the int lengths. Present in every release since 7.2.4.

The existing SORT tests cover BY patterns with small elements and therefore never hit the overflow.

Fix

Change the four length variables to size_t at src/sort.c:72. The arithmetic at lines 98, 105, 107 is either a ptrdiff_t→size_t widening (safe since pointers are within the string) or pure size_t subtraction that cannot underflow given the invariants established by strchr/strstr.

Testing

tests/unit/violations.tcl adds a large-memory test: raise proto-max-bulk-len and client-query-buffer-limit to 3 GiB (the 1 GiB client-query-buffer-limit default drops the connection before the 2 GiB SADD completes, so both limits must be raised), SADD a member of 2^31+1 bytes via write_big_bulk, then SORT myset BY weight_* LIMIT 0 0, then assert r ping returns PONG. Tagged sort large-memory and wrapped in run_solo. Requires ≥5 GiB of server RAM.

With the fix reverted to int and both limits raised, the server aborts with Out Of Memory allocating 18446744071562067994 bytes! and the test fails.

Alternative considered

Returning NULL early when prefixlen + sublen + postfixlen > server.proto_max_bulk_len would also prevent the crash and avoid a transient 2 GiB allocation (a key that long can never be SET so the lookup would always miss). Left out: it adds a server dependency to a function that currently has none, and the size_t change already eliminates the abort. A guard can follow separately if the allocation is a concern.

This was generated by AI but verified, with love, by a human.

lookupKeyByPattern() in src/sort.c kept prefixlen, sublen, postfixlen,
and fieldlen as int.  sdslen() returns size_t, so assigning a set or
list element whose length is >= 2^31 bytes silently stores a negative
int.  Passing that sum to createStringObject() sign-extends it to a
huge size_t (~2^64), and the allocator aborts the process.

Change the four length variables to size_t so the arithmetic stays in
the unsigned domain and no overflow occurs.

Introduced by 3c25c4a ("lookupKeyByPattern() used by SORT GET/BY
rewritten", 2012-04-17), which replaced the old 1024-byte key guard
with heap allocation but kept the int lengths.

Signed-off-by: Madelyn Olson <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Walkthrough

SORT pattern and field lengths now use size_t. A large-memory regression test checks that the server responds to PING after a SORT BY query with a member larger than 2 GiB.

Changes: SORT pattern length handling

Layer / File(s) Summary
Length handling and regression test
src/sort.c, tests/unit/violations.tcl
The SORT pattern and field length variables now use size_t. The regression test uses a 2,147,483,649-byte set member and checks that PING returns PONG after the SORT query. The test skips cluster mode.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • valkey-io/valkey#5132: Changes HyperLogLog hashing length handling from int to size_t for very large strings.
  • valkey-io/valkey#5133: Changes key comparison and eviction caching length handling for very large SDS values.

Suggested reviewers: rainsupreme

Merge Risk: Minimal · up to 32e39

The fix prevents oversized SORT substitutions from crashing the server, with a targeted regression test. No actionable merge-blocking issue remains.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title names the main change: fixing an integer overflow in SORT BY/GET pattern key substitution. The changeset replaces the int length variables in lookupKeyByPattern() in src/sort.c with size_t, …
Description check Passed The description is directly related to the changeset. It explains the int-to-size_t change in lookupKeyByPattern() at src/sort.c:72, describes the overflow path, documents the large-memory regression …
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: fixing an integer overflow in SORT BY/GET pattern key substitution. The changeset replaces the int length variables in lookupKeyByPattern() in src/sort.c with size_t, and adds a regression test. The title matches the primary change and is specific enough for a reviewer scanning history.

Full details: Description check

Explanation

The description is directly related to the changeset. It explains the int-to-size_t change in lookupKeyByPattern() at src/sort.c:72, describes the overflow path, documents the large-memory regression test in tests/unit/violations.tcl, and lists an alternative fix that was considered.

Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 1 files. (1 skipped: 1 unsupported.)

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share
Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 884a75dd-5358-4d93-b9e0-048e8b15976b
Commits

Reviewing files that changed from the base of the PR and between 13d7ed2 and 32e3999.

Files selected for processing: 2
  • src/sort.c
  • tests/unit/violations.tcl

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.

@rainsupreme rainsupreme left a comment

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.

Comment review only, so auto-merge waits for you. One nit inline.

Comment thread tests/unit/violations.tcl Outdated

# SORT BY substitution with a set member >= 2^31 bytes.
# lookupKeyByPattern() kept the prefix, element, and postfix lengths as int.
# A member exactly at INT_MAX+1 bytes makes prefixlen+sublen+postfixlen overflow

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.

nit: this says "INT_MAX+1", but the write at line 118 is 2147483649, which is INT_MAX+2. Please make the two agree.

@rainsupreme rainsupreme added the release-notes This issue should get a line item in the release notes label Oct 30, 2026
The comment said INT_MAX+1 bytes, but the test writes 2147483649 bytes,
which is INT_MAX+2.

Signed-off-by: Madelyn Olson <[email protected]>
@valkey-review-bot

Copy link
Copy Markdown
Contributor

Review state

Ready for human review.
The fix is correct. Switching the lengths to size_t removes the sign-extension abort, and the unsigned subtractions at src/sort.c:98 and :107 cannot underflow. The new large-memory test covers the overflow path, and its comment and write size now agree (INT_MAX+2).

Risk: Low. A one-line type widening in a local function. A mistake would only affect SORT BY/GET pattern substitution, and the existing SORT tests cover that path.

Open findings: none.

Backport: Needed for 9.2, 9.1, 9.0, 8.1, 8.0, 7.2. The int prefixlen, sublen, postfixlen, fieldlen; declaration in lookupKeyByPattern is present in src/sort.c on all six maintained release branches.

Updated for 32e3999 at 2026-11-04 03:32 UTC. The bot rewrites this comment on every review.

@codecov

codecov Bot commented Nov 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.16%. Comparing base (20f6409) to head (32e3999).
⚠️ Report is 67 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #5146      +/-   ##
============================================
+ Coverage     80.95%   81.16%   +0.20%     
============================================
  Files           198      199       +1     
  Lines        103153   103360     +207     
============================================
+ Hits          83505    83889     +384     
+ Misses        19648    19471     -177     
Files with missing lines Coverage Δ
src/sort.c 96.49% <100.00%> (ø)

... and 50 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rainsupreme rainsupreme left a comment

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.

Thanks for the updates. The length fix looks right. The large-memory test does not run in PR CI, but it aborted on the base and passed on this head in a local run.

@madolson
madolson merged commit fb22585 into valkey-io:unstable Nov 4, 2026
65 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to To be backported in Valkey 9.1 Nov 4, 2026
@github-project-automation github-project-automation Bot moved this to To be backported in Valkey 7.2 Nov 4, 2026
@github-project-automation github-project-automation Bot moved this to To be backported in Valkey 8.0 Nov 4, 2026
@github-project-automation github-project-automation Bot moved this from Todo to To be backported in Valkey 9.2 Nov 4, 2026
@github-project-automation github-project-automation Bot moved this to To be backported in Valkey 9.0 Nov 4, 2026
@github-project-automation github-project-automation Bot moved this to To be backported in Valkey 8.1 Nov 4, 2026
valkeyrie-ops Bot pushed a commit that referenced this pull request Nov 5, 2026
SORT and SORT_RO kept the prefix, element, and postfix lengths in
`lookupKeyByPattern()` (`src/sort.c:72`) as `int`. When the substituted
element is ≥ 2^31 bytes, assigning `sdslen(element)` to `int` wraps to a
negative value; the sum passed to `createStringObject()` sign-extends to
~2^64 as `size_t`, and the allocator aborts the process. Changing the
four variables to `size_t` keeps the arithmetic in the unsigned domain.

Signed-off-by: Madelyn Olson <[email protected]>
Backport-Source-PR: 5146
JimB123 pushed a commit that referenced this pull request Nov 6, 2026
SORT and SORT_RO kept the prefix, element, and postfix lengths in
`lookupKeyByPattern()` (`src/sort.c:72`) as `int`. When the substituted
element is ≥ 2^31 bytes, assigning `sdslen(element)` to `int` wraps to a
negative value; the sum passed to `createStringObject()` sign-extends to
~2^64 as `size_t`, and the allocator aborts the process. Changing the
four variables to `size_t` keeps the arithmetic in the unsigned domain.

Signed-off-by: Madelyn Olson <[email protected]>
Backport-Source-PR: 5146
sarthakaggarwal97 pushed a commit to sarthakaggarwal97/valkey that referenced this pull request Nov 17, 2026
…io#5146)

SORT and SORT_RO kept the prefix, element, and postfix lengths in
`lookupKeyByPattern()` (`src/sort.c:72`) as `int`. When the substituted
element is ≥ 2^31 bytes, assigning `sdslen(element)` to `int` wraps to a
negative value; the sum passed to `createStringObject()` sign-extends to
~2^64 as `size_t`, and the allocator aborts the process. Changing the
four variables to `size_t` keeps the arithmetic in the unsigned domain.

Signed-off-by: Madelyn Olson <[email protected]>
Backport-Source-PR: 5146
sarthakaggarwal97 pushed a commit to sarthakaggarwal97/valkey that referenced this pull request Nov 17, 2026
…io#5146)

SORT and SORT_RO kept the prefix, element, and postfix lengths in
`lookupKeyByPattern()` (`src/sort.c:72`) as `int`. When the substituted
element is ≥ 2^31 bytes, assigning `sdslen(element)` to `int` wraps to a
negative value; the sum passed to `createStringObject()` sign-extends to
~2^64 as `size_t`, and the allocator aborts the process. Changing the
four variables to `size_t` keeps the arithmetic in the unsigned domain.

Signed-off-by: Madelyn Olson <[email protected]>
Backport-Source-PR: 5146
sarthakaggarwal97 pushed a commit to sarthakaggarwal97/valkey that referenced this pull request Nov 17, 2026
…io#5146)

SORT and SORT_RO kept the prefix, element, and postfix lengths in
`lookupKeyByPattern()` (`src/sort.c:72`) as `int`. When the substituted
element is ≥ 2^31 bytes, assigning `sdslen(element)` to `int` wraps to a
negative value; the sum passed to `createStringObject()` sign-extends to
~2^64 as `size_t`, and the allocator aborts the process. Changing the
four variables to `size_t` keeps the arithmetic in the unsigned domain.

Signed-off-by: Madelyn Olson <[email protected]>
Backport-Source-PR: 5146
sarthakaggarwal97 pushed a commit to sarthakaggarwal97/valkey that referenced this pull request Nov 17, 2026
…io#5146)

SORT and SORT_RO kept the prefix, element, and postfix lengths in
`lookupKeyByPattern()` (`src/sort.c:72`) as `int`. When the substituted
element is ≥ 2^31 bytes, assigning `sdslen(element)` to `int` wraps to a
negative value; the sum passed to `createStringObject()` sign-extends to
~2^64 as `size_t`, and the allocator aborts the process. Changing the
four variables to `size_t` keeps the arithmetic in the unsigned domain.

Signed-off-by: Madelyn Olson <[email protected]>
Backport-Source-PR: 5146
sarthakaggarwal97 pushed a commit that referenced this pull request Nov 18, 2026
SORT and SORT_RO kept the prefix, element, and postfix lengths in
`lookupKeyByPattern()` (`src/sort.c:72`) as `int`. When the substituted
element is ≥ 2^31 bytes, assigning `sdslen(element)` to `int` wraps to a
negative value; the sum passed to `createStringObject()` sign-extends to
~2^64 as `size_t`, and the allocator aborts the process. Changing the
four variables to `size_t` keeps the arithmetic in the unsigned domain.

Signed-off-by: Madelyn Olson <[email protected]>
Backport-Source-PR: 5146
sarthakaggarwal97 pushed a commit that referenced this pull request Nov 18, 2026
SORT and SORT_RO kept the prefix, element, and postfix lengths in
`lookupKeyByPattern()` (`src/sort.c:72`) as `int`. When the substituted
element is ≥ 2^31 bytes, assigning `sdslen(element)` to `int` wraps to a
negative value; the sum passed to `createStringObject()` sign-extends to
~2^64 as `size_t`, and the allocator aborts the process. Changing the
four variables to `size_t` keeps the arithmetic in the unsigned domain.

Signed-off-by: Madelyn Olson <[email protected]>
Backport-Source-PR: 5146
sarthakaggarwal97 pushed a commit that referenced this pull request Nov 18, 2026
SORT and SORT_RO kept the prefix, element, and postfix lengths in
`lookupKeyByPattern()` (`src/sort.c:72`) as `int`. When the substituted
element is ≥ 2^31 bytes, assigning `sdslen(element)` to `int` wraps to a
negative value; the sum passed to `createStringObject()` sign-extends to
~2^64 as `size_t`, and the allocator aborts the process. Changing the
four variables to `size_t` keeps the arithmetic in the unsigned domain.

Signed-off-by: Madelyn Olson <[email protected]>
Backport-Source-PR: 5146
@valkeyrie-ops valkeyrie-ops Bot moved this from To be backported to Done in Valkey 7.2 Nov 18, 2026
sarthakaggarwal97 added a commit that referenced this pull request Nov 18, 2026
> [!NOTE]
> **Opened ready despite 6 flagged items** (`force_ready` was set):
notes flagged low-confidence; release-safety guardrail overrode AI
triage; AI triaged PRs without release-notes (confirm include/exclude);
release lines contradict each other about a note; commits whose PR could
not be fetched; a distinct commit was dropped by a reused PR number.
Review the sections below and confirm before merging.

Cuts **7.2.16** onto release line `7.2`.

- Promotes the release notes into a dated section, bumps
`src/version.h`, and refreshes the running contributor list.
- Release notes computed over the range below
(`7.2.15..8991aee`):

```
mode: ga
source_ref: 7.2
target_branch: 7.2
base: 7.2.15 @ 20e068c
head: 8991aee @ 8991aee
```

### ⚠️ Notes to double-check

The generator flagged these notes low-confidence; confirm category and
wording before merging:

| PR | Category | Why flagged |
|----|----------|-------------|
| #5046 | Bug Fixes | explicit impact scope omitted: macOS |
| #4775 | Bug Fixes | could be Performance and Efficiency Improvements |
| #5246 | Bug Fixes | Schema-only change, server reply unchanged, so may
not be user-facing; PR also covers GET-PRIMARY-ADDR-BY-NAME, omitted
because the 7.2 commit title names only the MASTER command |

### Release-impact review

Code detected release-impact terms (availability, memory safety, data
integrity, access control, protocol, compatibility) in these PRs; this
forces review, it is not a severity classification.

The requested urgency is **SECURITY**. Confirm it and decide whether any
change needs a hand-authored **Security Fixes** entry:

⚠️ [#5178](#5178) names
**CVE-2021-32627**;
[#5163](#5163) names
**CVE-2021-32627**. A named CVE normally ships with `SECURITY` urgency
and a hand-authored **Security Fixes** entry; this holds the cut at any
other urgency.

<details>
<summary>26 PR(s) with impact signals</summary>

| PR | Title | Signal |
|----|-------|--------|
| [#5133](#5133) | Keep sds
lengths in size_t when comparing and caching keys | server crash,
assertion, or availability failure |
| [#5128](#5128) | Propagate
PFADD elements applied before an INVALIDOBJ error | data or
persisted-state corruption risk |
| [#5159](#5159) | Fill
unmatched postponed reply lengths left by a module | server crash,
assertion, or availability failure |
| [#4351](#4351) | Fix NULL
deref in usUntilEarliestTimer when all time events are deleted | server
crash, assertion, or availability failure |
| [#4665](#4665) | Check the
SORT destination that is actually written | security, access-control, or
injection hardening |
| [#5178](#5178) | Check XADD
element size before creating the stream | server crash, assertion, or
availability failure |
| [#5180](#5180) | Redact HELLO,
AUTH and MIGRATE credentials before validating arguments | security,
access-control, or injection hardening |
| [#4929](#4929) | Guard NULL
replica_primary_host in Sentinel INFO handling | server crash,
assertion, or availability failure |
| [#5087](#5087) | Treat key
specs that start past the last argument as matching no keys |
memory-safety risk |
| [#5187](#5187) | Defer freeing
the client that runs a replication role change | server crash,
assertion, or availability failure |
| [#5163](#5163) | Fix integer
overflow in _quicklistNodeAllowMerge size check | server crash,
assertion, or availability failure |
| [#5146](#5146) | Fix integer
overflow in SORT BY/GET pattern key substitution | undefined behavior or
unsafe arithmetic |
| [#5155](#5155) | Reject
ValkeyModule_Calloc requests whose nmemb * size overflows | server
crash, assertion, or availability failure |
| [#5124](#5124) | Reject sparse
HLLs that end in a truncated XZERO opcode | data or persisted-state
corruption risk |
| [#5138](#5138) | Fix
hllSparseSet aborting on SDS_TYPE_5 strings when deltalen is zero |
server crash, assertion, or availability failure |
| [#5184](#5184) | Treat a
replica with no known primary as owning no slots | server crash,
assertion, or availability failure |
| [#5126](#5126) | Reject a
+CONTINUE reply to PSYNC when there is no cached primary | server crash,
assertion, or availability failure |
| [#5137](#5137) | Ignore ping
extension values that nodes.conf cannot load | data or persisted-state
corruption risk |
| [#5065](#5065) | Cap the
length of inbound cluster bus packets | security, access-control, or
injection hardening |
| [#3848](#3848) | Fix cluster
AUX-field control-character and delimiter injection | data or
persisted-state corruption risk |
| [#3229](#3229) | Converge
divergent shard-id persisted in nodes.conf to master's shard… | data or
persisted-state corruption risk |
| [#5085](#5085) | Disconnect
default user subscribers to revoked channels on ACL LOAD | security,
access-control, or injection hardening |
| [#5349](#5349) | Treat a torn
annotation at the end of an AOF file as a short read | server crash,
assertion, or availability failure |
| [#5435](#5435) | Don't free
the client that is executing a command when a blocked client's
re-executed command evicts clients | memory-safety risk |
| [#5134](#5134) | Do not adopt
the MYSELF flag from a gossip entry | server crash, assertion, or
availability failure |
| [#5246](#5246) | Allow null in
SENTINEL GET-PRIMARY-ADDR-BY-NAME reply schema | wire-protocol or reply
correctness |

</details>

### Excluded from generated notes (listed under Security Fixes)

#5435 was supplied as a `--security-fix`, so the generated bullet(s) in
the normal categories were dropped to avoid double-listing. To keep the
notes consistent, it appears only under **Security Fixes**, where each
is reviewed as a factual security entry.

### ⚠️ Release-safety guardrail overrode AI triage

AI excluded these PRs (or gave no verdict) but their text names a
release-impact signal, so code forced them into the notes; confirm each
bullet, category, urgency, and security treatment:

| PR | Title | Guardrail reason |
|----|-------|------------------|
| [#5246](#5246) | Allow null in
SENTINEL GET-PRIMARY-ADDR-BY-NAME reply schema | ⚠️ release-safety
guardrail (wire-protocol or reply correctness; AI exclusion) |

### Triage summary

- 27 PR(s) triaged into the notes
- 16 PR(s) triaged out

Per-PR verdicts (with reasons) are in the run's `triage-verdicts`
artifact. To include a wrongly-dropped PR, label it `release-notes` and
re-cut.

### ⚠️ Commits whose PR could not be fetched

These range commits name a PR that could not be fetched and are
**absent** from the notes; note any user-facing change by hand:

| Commit | PR referenced |
|--------|---------------|
| `525e89e1b6b6` | #13071 |
| `e1c52f05a9fe` | #12930 |

### ⚠️ Commits dropped by a reused PR number

Two commits resolved to the same `(#N)`; the one below was **dropped**
and is absent from the notes, so note it by hand if it is a separate
user-facing change:

| Dropped commit | Subject | Reused # | Kept commit |
|----------------|---------|----------|-------------|
| `01d9ab7c7668` | Wait for SHUTDOWN to block before closing its client
(#5396) | #5396 | `8445a35ed8ab` |
| `2ae815571c82` | Run cluster packet regressions in the default suite
(#5065) | #5065 | `d8b0f7252d38` |
| `2a2f72749182` | Run replica-detach regressions in the default suite
(#5184) | #5184 | `d62ccbcc9b3b` |

### ⚠️ Release lines disagree about a note

Another release line already published a note for these PRs, but this
cut kept its own wording, so the entries will not read identically:

⚠️ #5133: the two lines contradict each other about the change itself,
not just its wording, which code must not resolve on its own. Read the
note on each line and settle which one is right before merging.

<details>
<summary>3 note(s) not reusing published wording</summary>

| PR | Other line | Why the wording was not reused |
|----|------------|--------------------------------|
| #5133 | `9.2` (Valkey 9.2.0-rc2) | ⚠️ `9.2` limits the change to
32-bit but this cut's note says no environment limit, so the lines
disagree about how far the change reaches |
| #5178 | `9.2` (Valkey 9.2.0-rc2) | the PR names a CVE, so its wording
is authored per release line by a human |
| #5163 | `9.2` (Valkey 9.2.0-rc2) | the PR names a CVE, so its wording
is authored per release line by a human |

</details>

### Wording carried from other release lines

A backported change is cut once per release line, and each cut words its
notes independently. To keep one commit from being described differently
per branch, a note whose source PR another line already published takes
that published wording verbatim (joined on the trailing `(#N)`, which
always names the original source PR). Only the text is reused; the
category, the `by @handle` credit, and the `(#N)` are this cut's own.

- Release lines consulted: `9.2`, `9.1`, `9.0`, `8.1`, `8.0`, `7.0`,
`6.2`, `6.0`, `5.0`, `4.0`, `3.2`, `3.0`, `2.8`, `2.6`, `2.4`, `2.2`
- Reused published wording for 22 note(s)

<details>
<summary>22 note(s) reusing published wording</summary>

| PR | Wording from | Carried wording | This cut generated |
|----|--------------|-----------------|--------------------|
| #5210 | `9.2` (Valkey 9.2.0-rc2) | Correct command metadata to
describe the `ZINCRBY` increment and
`ZINTER`/`ZINTERSTORE`/`ZUNION`/`ZUNIONSTORE` weights as doubles instead
of integers | Fix command metadata to describe the `ZINCRBY` increment
and the `ZINTER`, `ZINTERSTORE`, `ZUNION` and `ZUNIONSTORE` weights as
doubles instead of integers |
| #5128 | `9.2` (Valkey 9.2.0-rc2) | Propagate `PFADD` elements applied
before a corrupted-HLL INVALIDOBJ error so replicas and the AOF stay
consistent with the primary | Fix `PFADD` on a corrupted sparse
HyperLogLog not propagating elements applied before the `INVALIDOBJ`
error to replicas, the AOF, `WATCH` and client tracking |
| #5159 | `9.2` (Valkey 9.2.0-rc2) | Fix a server crash when a module
never sets a postponed reply length; the leftover placeholder is now
filled with an empty array | Fix a server crash when a module replies
with a postponed-length array, map, set or attribute and never sets its
length |
| #5212 | `9.2` (Valkey 9.2.0-rc2) | Mark the `RESTORE` and
`RESTORE-ASKING` `IDLETIME` and `FREQ` options as mutually exclusive in
command metadata | Fix `RESTORE` and `RESTORE-ASKING` command metadata
to mark `IDLETIME` and `FREQ` as mutually exclusive |
| #5118 | `9.2` (Valkey 9.2.0-rc2) | Fix a server panic when a Lua
script returns or raises an error table whose metatable has an `__index`
metamethod that raises an error | Fix the server exiting when a Lua
script returns or raises an error table whose metatable has a raising
`__index` |
| #5120 | `9.2` (Valkey 9.2.0-rc2) | Fix a memory leak when
`server.register_function` named arguments are repeated in a different
letter case | Fix a memory leak in `server.register_function` when a
named argument is repeated with different letter case |
| #5213 | `9.2` (Valkey 9.2.0-rc2) | Correct expiry command metadata to
show that `XX` can be combined with `GT` or `LT`, rather than all four
conditions being mutually exclusive | Fix command metadata for the
`EXPIRE` and `HEXPIRE` command families to show that `XX` can be
combined with `GT` or `LT` |
| #5046 | `9.2` (Valkey 9.2.0-rc2) | Fix a memory leak in
`ValkeyModule_GetCommandKeysWithFlags` when introspecting commands with
large key lists | Fix a memory leak in
`ValkeyModule_GetCommandKeysWithFlags` for commands with large key lists
|
| #4775 | `9.2` (Valkey 9.2.0-rc2) | Bound the time spent per cycle
evicting keys from the client tracking table, avoiding long stalls after
lowering `tracking-table-max-keys` | Fix long server stalls after
lowering `tracking-table-max-keys` by bounding the time spent evicting
keys from the client tracking table per call |
| #5208 | `9.2` (Valkey 9.2.0-rc2) | Correct `SENTINEL SIMULATE-FAILURE`
metadata so `COMMAND DOCS` shows the required mode argument and its
tokens | Fix `SENTINEL SIMULATE-FAILURE` argument metadata so `COMMAND
DOCS` reports the mode as required and includes its tokens |
| #3510 | `9.2` (Valkey 9.2.0-rc1) | Fix a TLS busy loop that consumed
100% CPU when a connection's read or write handler was removed while
OpenSSL was waiting for the opposite event | Fix a TLS busy loop
consuming 100% CPU when a connection's read or write handler is removed
while OpenSSL is waiting on the opposite event |
| #4351 | `9.2` (Valkey 9.2.0-rc1) | Fix a crash caused by a NULL
pointer dereference when all timer events in an event loop are pending
deletion | Fix a NULL dereference crash in the event loop when all time
events are pending deletion |
| #4665 | `9.2` (Valkey 9.2.0-rc1) | Fix `SORT` key extraction so a
`STORE` destination named like an option can no longer bypass ACL checks
and write to an unauthorized key | Fix `SORT` checking ACL key
permissions against the wrong key when a `STORE` destination is named
like an option, which allowed writes to keys outside the user's allowed
patterns |
| #4777 | `9.2` (Valkey 9.2.0-rc2) | Fix `GEOSEARCH` returning empty
results for exact zero-distance matches on builds where floating-point
contraction breaks the latitude distance calculation | Fix `GEOSEARCH`
with a zero radius or box missing the exact-position member on some
builds due to floating-point precision |
| #5180 | `9.2` (Valkey 9.2.0-rc2) | Redact credentials of rejected
`HELLO`, `AUTH` and `MIGRATE` commands so passwords no longer leak to
MONITOR and the commandlog | Redact `HELLO`, `AUTH` and `MIGRATE`
credentials in `MONITOR` and the commandlog even when the command is
rejected for invalid arguments |
| #5244 | `9.2` (Valkey 9.2.0-rc2) | Correct `ZADD` and `LCS` metadata
so `COMMAND DOCS` and valkey-cli hints no longer present `NX` with
`GT`/`LT` or `LEN` with `IDX` as valid combinations | Fix `ZADD` and
`LCS` command metadata so `COMMAND DOCS` and valkey-cli hints mark
mutually exclusive options (`NX` with `GT`/`LT`, `LEN` with `IDX`) |
| #5187 | `9.2` (Valkey 9.2.0-rc2) | Fix a crash when a replication role
change command such as `REPLICAOF` or `CLUSTER REPLICATE` arrives over a
replication link | Fix a crash when a replication role change command
such as `REPLICAOF`, `CLUSTER REPLICATE`, `CLUSTER RESET` or `CLUSTER
FAILOVER TAKEOVER` arrives over a replication link |
| #5126 | `9.2` (Valkey 9.2.0-rc2) | Prevent a replica crash when the
primary wrongly replies +CONTINUE to a full resync request; the replica
now drops the link and retries | Fix a replica crash when the primary
replies `+CONTINUE` to a full resync `PSYNC` request and there is no
cached primary |
| #4171 | `9.2` (Valkey 9.2.0-rc1) | Fix a node staying stuck in PFAIL
when its PING is lost while the peer's own traffic keeps the cluster
link alive | Fix a cluster node staying stuck in PFAIL state when its
PING is lost but the peer's own PINGs keep the link alive |
| #5137 | `9.2` (Valkey 9.2.0-rc2) | Ignore invalid ping extension
values from cluster peers that would corrupt nodes.conf and prevent the
node from restarting | Ignore invalid cluster bus ping extension values
(hostname, node name, client IPs, availability zone) that would corrupt
nodes.conf and prevent the node from restarting |
| #5161 | `9.2` (Valkey 9.2.0-rc2) | Bound the bytes the cluster bus
reads per event so a peer with a constant read backlog cannot starve
clients, cron and heartbeats | Limit the bytes read per event from a
cluster bus link so a peer that keeps sending cannot starve clients,
cron and heartbeats |
| #4190 | `9.2` (Valkey 9.2.0-rc2) | Reclaim client-side caching
tracking table entries left by disconnected clients, fixing a memory
leak under read-heavy workloads, and include the tracking table in
active defrag | Fix a memory leak in client-side caching where IDs of
disconnected clients stayed in the tracking table for keys that are
never modified |

</details>

*Generated by valkey-ci-agent. Review before merging into the release
line.*

---------

Signed-off-by: valkeyrie-bot[bot] <3692572+valkeyrie-bot[bot]@users.noreply.github.com>
Signed-off-by: Sarthak Aggarwal <[email protected]>
Co-authored-by: valkeyrie-bot[bot] <3692572+valkeyrie-bot[bot]@users.noreply.github.com>
Co-authored-by: Sarthak Aggarwal <[email protected]>
sarthakaggarwal97 pushed a commit that referenced this pull request Nov 18, 2026
SORT and SORT_RO kept the prefix, element, and postfix lengths in
`lookupKeyByPattern()` (`src/sort.c:72`) as `int`. When the substituted
element is ≥ 2^31 bytes, assigning `sdslen(element)` to `int` wraps to a
negative value; the sum passed to `createStringObject()` sign-extends to
~2^64 as `size_t`, and the allocator aborts the process. Changing the
four variables to `size_t` keeps the arithmetic in the unsigned domain.

Signed-off-by: Madelyn Olson <[email protected]>
Backport-Source-PR: 5146
@valkeyrie-ops valkeyrie-ops Bot moved this from To be backported to Done in Valkey 9.1 Nov 18, 2026
sarthakaggarwal97 pushed a commit that referenced this pull request Nov 18, 2026
> [!NOTE]
> **Opened ready despite 6 flagged items** (`force_ready` was set):
notes flagged low-confidence; release-safety guardrail overrode AI
triage; AI triaged PRs without release-notes (confirm include/exclude);
release lines contradict each other about a note; notes credited to a
backport; a distinct commit was dropped by a reused PR number. Review
the sections below and confirm before merging.

Cuts **9.1.4** onto release line `9.1`.

- Promotes the release notes into a dated section, bumps
`src/version.h`, and refreshes the running contributor list.
- Release notes computed over the range below
(`9.1.3..2bc716e`):

```
mode: ga
source_ref: 9.1
target_branch: 9.1
base: 9.1.3 @ 29173b6
head: 2bc716e @ 2bc716e
```

### ⚠️ Notes to double-check

The generator flagged these notes low-confidence; confirm category and
wording before merging:

| PR | Category | Why flagged |
|----|----------|-------------|
| #5170 | Bug Fixes | could be Bug Fixes or Performance and Efficiency
Improvements |
| #4775 | Bug Fixes | could be Bug Fixes or Performance and Efficiency
Improvements |
| #4190 | Bug Fixes | adds new sweep and defrag mechanisms in a patch
release; could be a feature or performance change |
| #3683 | Build and Tooling | build-only fix; release-notes label not
confirmed; non-fix category on a patch release needs explicit maintainer
confirmation |
| #5046 | Bug Fixes | explicit impact scope omitted: macOS |
| #5246 | Bug Fixes | schema-only fix; may not be user-facing |
| #4913 | Bug Fixes | explicit impact scope omitted: macOS |

### Release-impact review

Code detected release-impact terms (availability, memory safety, data
integrity, access control, protocol, compatibility) in these PRs; this
forces review, it is not a severity classification.

The requested urgency is **SECURITY**. Confirm it and decide whether any
change needs a hand-authored **Security Fixes** entry:

⚠️ [#5127](#5127) names
**CVE-2021-32672**;
[#5178](#5178) names
**CVE-2021-32627**;
[#5163](#5163) names
**CVE-2021-32627**. A named CVE normally ships with `SECURITY` urgency
and a hand-authored **Security Fixes** entry; this holds the cut at any
other urgency.

<details>
<summary>38 PR(s) with impact signals</summary>

| PR | Title | Signal |
|----|-------|--------|
| [#4968](#4968) | Fix crash
when a database's keyspace is replaced mid-stage during defrag |
memory-safety risk |
| [#5091](#5091) | Fix VM_Call
crash on script-mode validation errors | server crash, assertion, or
availability failure |
| [#5133](#5133) | Keep sds
lengths in size_t when comparing and caching keys | server crash,
assertion, or availability failure |
| [#5128](#5128) | Propagate
PFADD elements applied before an INVALIDOBJ error | data or
persisted-state corruption risk |
| [#5127](#5127) | Script
debugger: reset *argc on partial-read exit to fix server crash in SYNC
mode | server crash, assertion, or availability failure |
| [#5159](#5159) | Fill
unmatched postponed reply lengths left by a module | server crash,
assertion, or availability failure |
| [#4091](#4091) | Fix crash
when processing heartbeat from a node with no local role | server crash,
assertion, or availability failure |
| [#4351](#4351) | Fix NULL
deref in usUntilEarliestTimer when all time events are deleted | server
crash, assertion, or availability failure |
| [#4670](#4670) | Reject
repeated CLUSTER SYNCSLOTS ESTABLISH on the same connection |
memory-safety risk |
| [#4665](#4665) | Check the
SORT destination that is actually written | security, access-control, or
injection hardening |
| [#5187](#5187) | Defer freeing
the client that runs a replication role change | server crash,
assertion, or availability failure |
| [#5182](#5182) | Exempt slot
import SYNCSLOTS FINISH from the write pause assertion | server crash,
assertion, or availability failure |
| [#5178](#5178) | Check XADD
element size before creating the stream | server crash, assertion, or
availability failure |
| [#5180](#5180) | Redact HELLO,
AUTH and MIGRATE credentials before validating arguments | security,
access-control, or injection hardening |
| [#5126](#5126) | Reject a
+CONTINUE reply to PSYNC when there is no cached primary | server crash,
assertion, or availability failure |
| [#5114](#5114) | Allow
server.log() during FUNCTION LOAD | server crash, assertion, or
availability failure |
| [#5163](#5163) | Fix integer
overflow in _quicklistNodeAllowMerge size check | server crash,
assertion, or availability failure |
| [#5151](#5151) | Fix
writevToClient stack overflow for empty bulk strings with copy avoidance
| data or persisted-state corruption risk |
| [#5137](#5137) | Ignore ping
extension values that nodes.conf cannot load | data or persisted-state
corruption risk |
| [#5184](#5184) | Treat a
replica with no known primary as owning no slots | server crash,
assertion, or availability failure |
| [#5124](#5124) | Reject sparse
HLLs that end in a truncated XZERO opcode | data or persisted-state
corruption risk |
| [#5138](#5138) | Fix
hllSparseSet aborting on SDS_TYPE_5 strings when deltalen is zero |
server crash, assertion, or availability failure |
| [#5146](#5146) | Fix integer
overflow in SORT BY/GET pattern key substitution | undefined behavior or
unsafe arithmetic |
| [#5155](#5155) | Reject
ValkeyModule_Calloc requests whose nmemb * size overflows | server
crash, assertion, or availability failure |
| [#4929](#4929) | Guard NULL
replica_primary_host in Sentinel INFO handling | server crash,
assertion, or availability failure |
| [#5087](#5087) | Treat key
specs that start past the last argument as matching no keys |
memory-safety risk |
| [#5162](#5162) | Free the ACL
log object when the ACL log is disabled | security, access-control, or
injection hardening |
| [#5115](#5115) | functions:
key per-engine stats by registered name, not shebang text | server
crash, assertion, or availability failure |
| [#5164](#5164) | Only resume a
hash defrag scan from the hash scanner's own cursor | server crash,
assertion, or availability failure |
| [#5065](#5065) | Cap the
length of inbound cluster bus packets | security, access-control, or
injection hardening |
| [#5117](#5117) | Allow the Lua
debugger to start on an empty script | server crash, assertion, or
availability failure |
| [#5134](#5134) | Do not adopt
the MYSELF flag from a gossip entry | server crash, assertion, or
availability failure |
| [#5033](#5033) | Respect
NOFAILOVER during shutdown failover | security, access-control, or
injection hardening |
| [#5085](#5085) | Disconnect
default user subscribers to revoked channels on ACL LOAD | security,
access-control, or injection hardening |
| [#5349](#5349) | Treat a torn
annotation at the end of an AOF file as a short read | server crash,
assertion, or availability failure |
| [#5246](#5246) | Allow null in
SENTINEL GET-PRIMARY-ADDR-BY-NAME reply schema | wire-protocol or reply
correctness |
| [#4913](#4913) | Expire stale
Sentinel primary-down reports before quorum checks | security,
access-control, or injection hardening |
| [#5435](#5435) | Don't free
the client that is executing a command when a blocked client's
re-executed command evicts clients | memory-safety risk |

</details>

### Excluded from generated notes (listed under Security Fixes)

#5435 was supplied as a `--security-fix`, so the generated bullet(s) in
the normal categories were dropped to avoid double-listing. To keep the
notes consistent, it appears only under **Security Fixes**, where each
is reviewed as a factual security entry.

### ⚠️ Release-safety guardrail overrode AI triage

AI excluded these PRs (or gave no verdict) but their text names a
release-impact signal, so code forced them into the notes; confirm each
bullet, category, urgency, and security treatment:

| PR | Title | Guardrail reason |
|----|-------|------------------|
| [#5246](#5246) | Allow null in
SENTINEL GET-PRIMARY-ADDR-BY-NAME reply schema | ⚠️ release-safety
guardrail (wire-protocol or reply correctness; AI exclusion) |

### Triage summary

- 44 PR(s) triaged into the notes
- 18 PR(s) triaged out

Per-PR verdicts (with reasons) are in the run's `triage-verdicts`
artifact. To include a wrongly-dropped PR, label it `release-notes` and
re-cut.

### ⚠️ Notes credited to a backport (original PR not recovered)

These notes credit the backport PR, not the change's author; confirm the
original PR and correct the credit before merging:

| Backport PR | Title |
|-------------|-------|
| [#4968](#4968) | Fix crash
when a database's keyspace is replaced mid-stage during defrag |

### ⚠️ Commits dropped by a reused PR number

Two commits resolved to the same `(#N)`; the one below was **dropped**
and is absent from the notes, so note it by hand if it is a separate
user-facing change:

| Dropped commit | Subject | Reused # | Kept commit |
|----------------|---------|----------|-------------|
| `88fd9d32ef74` | Deflake replica selection test with a longer
cluster-node-timeout (#5396) | #5396 | `2a3cf2dd6b09` |

### ⚠️ Release lines disagree about a note

Another release line already published a note for these PRs, but this
cut kept its own wording, so the entries will not read identically:

⚠️ #5133: the two lines contradict each other about the change itself,
not just its wording, which code must not resolve on its own. Read the
note on each line and settle which one is right before merging.

<details>
<summary>5 note(s) not reusing published wording</summary>

| PR | Other line | Why the wording was not reused |
|----|------------|--------------------------------|
| #5133 | `9.2` (Valkey 9.2.0-rc2) | ⚠️ `9.2` limits the change to
32-bit but this cut's note says no environment limit, so the lines
disagree about how far the change reaches |
| #5127 | `9.2` (Valkey 9.2.0-rc2) | the PR names a CVE, so its wording
is authored per release line by a human |
| #4968 | `9.2` (Valkey 9.2.0-rc2) | this cut could not confirm the PR
the note credits (unresolved backport, cherry-pick, or reused PR
number), and that credit is the only thing joining the two notes |
| #5178 | `9.2` (Valkey 9.2.0-rc2) | the PR names a CVE, so its wording
is authored per release line by a human |
| #5163 | `9.2` (Valkey 9.2.0-rc2) | the PR names a CVE, so its wording
is authored per release line by a human |

</details>

### Wording carried from other release lines

A backported change is cut once per release line, and each cut words its
notes independently. To keep one commit from being described differently
per branch, a note whose source PR another line already published takes
that published wording verbatim (joined on the trailing `(#N)`, which
always names the original source PR). Only the text is reused; the
category, the `by @handle` credit, and the `(#N)` are this cut's own.

- Release lines consulted: `9.2`, `9.0`, `8.1`, `8.0`, `7.2`, `7.0`,
`6.2`, `6.0`, `5.0`, `4.0`, `3.2`, `3.0`, `2.8`, `2.6`, `2.4`, `2.2`
- 3 generated note(s) already match the published wording: #5138, #5155,
#5169
- Reused published wording for 55 note(s)

<details>
<summary>55 note(s) reusing published wording</summary>

| PR | Wording from | Carried wording | This cut generated |
|----|--------------|-----------------|--------------------|
| #5210 | `9.2` (Valkey 9.2.0-rc2) | Correct command metadata to
describe the `ZINCRBY` increment and
`ZINTER`/`ZINTERSTORE`/`ZUNION`/`ZUNIONSTORE` weights as doubles instead
of integers | Fix command metadata to describe the `ZINCRBY` increment
and the `ZINTER`, `ZINTERSTORE`, `ZUNION` and `ZUNIONSTORE` weights as
doubles instead of integers |
| #5128 | `9.2` (Valkey 9.2.0-rc2) | Propagate `PFADD` elements applied
before a corrupted-HLL INVALIDOBJ error so replicas and the AOF stay
consistent with the primary | Fix `PFADD` not propagating to replicas
and the AOF the elements it applied before a later element fails with
INVALIDOBJ on a corrupted sparse HyperLogLog |
| #5211 | `9.2` (Valkey 9.2.0-rc2) | Correct command metadata so the
`numfields` count argument of hash field commands is no longer
associated with a key specification | Fix command metadata that
incorrectly marked the `numfields` argument of hash field commands such
as `HGETEX`, `HSETEX` and `HPEXPIRE` as a key |
| #5213 | `9.2` (Valkey 9.2.0-rc2) | Correct expiry command metadata to
show that `XX` can be combined with `GT` or `LT`, rather than all four
conditions being mutually exclusive | Fix command metadata for `EXPIRE`,
`PEXPIRE`, `HEXPIRE` and related commands to show that `XX` can be
combined with `GT` or `LT` |
| #5118 | `9.2` (Valkey 9.2.0-rc2) | Fix a server panic when a Lua
script returns or raises an error table whose metatable has an `__index`
metamethod that raises an error | Fix the server exiting when a Lua
script returns or raises an error table whose metatable has a raising
`__index` |
| #5159 | `9.2` (Valkey 9.2.0-rc2) | Fix a server crash when a module
never sets a postponed reply length; the leftover placeholder is now
filled with an empty array | Fix a crash when a module replies with
`VALKEYMODULE_POSTPONED_LEN` and never sets the reply length |
| #4091 | `9.2` (Valkey 9.2.0-rc1) | Fix a crash when processing a
heartbeat from a cluster node whose role is locally unknown, such as
after loading an incomplete nodes.conf | Fix a crash when processing a
heartbeat from a cluster node that has no role locally, such as a
primary implicitly created while loading nodes.conf |
| #5212 | `9.2` (Valkey 9.2.0-rc2) | Mark the `RESTORE` and
`RESTORE-ASKING` `IDLETIME` and `FREQ` options as mutually exclusive in
command metadata | Fix command metadata to mark the `RESTORE` and
`RESTORE-ASKING` options `IDLETIME` and `FREQ` as mutually exclusive |
| #5184 | `7.2` (Valkey 7.2.16) | Fix a crash in a cluster replica whose
primary was removed from the nodes table when another primary claims an
unassigned slot | Fix a crash on a cluster replica with no known primary
when another primary claims an unassigned slot |
| #5108 | `7.2` (Valkey 7.2.16) | Fix `SCRIPT KILL` and `FUNCTION KILL`
not stopping Lua scripts that loop inside nested coroutines, and script
timeouts not being detected when work is spread across coroutines | Fix
`SCRIPT KILL` and `FUNCTION KILL` failing to stop Lua scripts that loop
inside nested coroutines, and script timeouts going undetected across
coroutines |
| #5124 | `7.2` (Valkey 7.2.16) | Fix an out-of-bounds write in `PFADD`
and `PFMERGE` on a corrupted sparse HyperLogLog ending in a truncated
XZERO opcode by rejecting it as invalid | Reject corrupted sparse
HyperLogLogs that end in a truncated XZERO opcode, preventing an
out-of-bounds write in `PFADD` and `PFMERGE` |
| #5146 | `7.2` (Valkey 7.2.16) | Fix a server crash in `SORT` and
`SORT_RO` with `BY` or `GET` patterns when an element is 2 GiB or larger
| Fix a crash in `SORT` and `SORT_RO` with `BY` or `GET` patterns when
an element is 2 GiB or larger |
| #5157 | `7.2` (Valkey 7.2.16) | Fix
`ValkeyModule_CallReplyAttributeElement` always returning an error on
RESP3 attribute replies | Fix `ValkeyModule_CallReplyAttributeElement`
always failing on RESP3 attribute replies |
| #5120 | `9.2` (Valkey 9.2.0-rc2) | Fix a memory leak when
`server.register_function` named arguments are repeated in a different
letter case | Fix a memory leak when `server.register_function` receives
the same named argument more than once in different letter case |
| #5167 | `9.2` (Valkey 9.2.0-rc2) | Fix quadratic slowdown in
`HRANDFIELD` and `SRANDMEMBER` with counts on collections whose elements
differ only in letter case | Fix `HRANDFIELD` and `SRANDMEMBER` with a
count blocking the server on hashes or sets whose elements differ only
in letter case |
| #5087 | `7.2` (Valkey 7.2.16) | Fix `PFMERGE` with no source keys
bypassing ACL key permissions and failing in `COMMAND GETKEYS`, and a
crash in module commands whose keynum key spec starts past the last
argument | Fix `PFMERGE` with no source keys bypassing ACL key
permission checks and failing in `COMMAND GETKEYS`, and fix a crash on
module commands whose keynum key spec starts past the last argument |
| #5199 | `7.2` (Valkey 7.2.16) | Fix `notify-keyspace-events` dropping
the `n` (new key) flag from `CONFIG GET` and `CONFIG REWRITE` when `A`
is also set | Fix `CONFIG GET` and `CONFIG REWRITE` dropping the `n`
flag of `notify-keyspace-events` when `A` is set, which silently
disabled new key events after a restart |
| #5134 | `7.2` (Valkey 7.2.16) | Fix a cluster node failing to restart
with an assertion after a gossip entry carrying the MYSELF flag adds a
second myself node to nodes.conf | Fix a cluster node failing to restart
after a gossip entry carrying the MYSELF flag adds a second myself node
to `nodes.conf` |
| #5085 | `7.2` (Valkey 7.2.16) | Fix `ACL LOAD` not disconnecting
default user clients subscribed to channels the reloaded rules no longer
allow | Fix `ACL LOAD` not disconnecting default user clients subscribed
to channels that the reloaded ACL file no longer allows |
| #4863 | `9.2` (Valkey 9.2.0-rc2) | Allow modules to block RESP3
clients that are subscribed to Pub/Sub channels instead of failing
`ValkeyModule_BlockClient` with ENOTSUP | Fix module commands being
unable to block RESP3 clients that are subscribed to Pub/Sub channels |
| #4775 | `9.2` (Valkey 9.2.0-rc2) | Bound the time spent per cycle
evicting keys from the client tracking table, avoiding long stalls after
lowering `tracking-table-max-keys` | Fix server stalls while evicting
keys from the client tracking table after `tracking-table-max-keys` is
lowered, by bounding the time spent per eviction call |
| #4190 | `9.2` (Valkey 9.2.0-rc2) | Reclaim client-side caching
tracking table entries left by disconnected clients, fixing a memory
leak under read-heavy workloads, and include the tracking table in
active defrag | Fix unbounded memory growth in the client tracking table
from disconnected clients' IDs on keys that are never modified, and
include the table in active defrag |
| #3683 | `9.2` (Valkey 9.2.0-rc1) | Fix clean or highly parallel builds
failing with a missing release.h for valkey-cli, valkey-benchmark, and
unit tests | Fix CMake builds of `valkey-cli`, `valkey-benchmark` and
unit tests failing with a missing `release.h` on clean or highly
parallel builds |
| #4995 | `9.2` (Valkey 9.2.0-rc2) | Fix a memory leak when `GEOSEARCH`
or `GEOSEARCHSTORE` is given repeated `BYPOLYGON` options | Fix a memory
leak in `GEOSEARCH` and `GEOSEARCHSTORE` when the `BYPOLYGON` option is
repeated |
| #5046 | `9.2` (Valkey 9.2.0-rc2) | Fix a memory leak in
`ValkeyModule_GetCommandKeysWithFlags` when introspecting commands with
large key lists | Fix a memory leak in the
`ValkeyModule_GetCommandKeysWithFlags` module API for commands with
large key lists |
| #5092 | `9.2` (Valkey 9.2.0-rc2) | `MEMORY USAGE` now counts hash
fields that have expired but not yet been reaped, fixing under-reported
sizes | Fix `MEMORY USAGE` under-reporting hashes that hold expired
fields not yet reclaimed |
| #5091 | `9.2` (Valkey 9.2.0-rc2) | Fix a crash in `ValkeyModule_Call`
when script-mode validation fails and error replies were not requested |
Fix a crash when a module calls `ValkeyModule_Call` in script mode (`S`)
without the error-reply flag (`E`) and the command fails validation |
| #5191 | `9.2` (Valkey 9.2.0-rc2) | In cluster mode, one cross-slot
command in a script no longer makes every later script and function call
fail until restart | Fix all later script and function calls failing
with "Attempted to access a non local key in a cluster node" after one
script runs a cross-slot command in cluster mode |
| #3510 | `9.2` (Valkey 9.2.0-rc1) | Fix a TLS busy loop that consumed
100% CPU when a connection's read or write handler was removed while
OpenSSL was waiting for the opposite event | Fix an infinite busy loop
consuming 100% CPU on TLS connections after a read or write handler is
removed |
| #4351 | `9.2` (Valkey 9.2.0-rc1) | Fix a crash caused by a NULL
pointer dereference when all timer events in an event loop are pending
deletion | Fix a NULL dereference crash in the event loop when all time
events are pending deletion |
| #4171 | `9.2` (Valkey 9.2.0-rc1) | Fix a node staying stuck in PFAIL
when its PING is lost while the peer's own traffic keeps the cluster
link alive | Fix a cluster node staying stuck in PFAIL when its PING is
lost while the peer's own PINGs keep the link alive |
| #4330 | `9.2` (Valkey 9.2.0-rc1) | `CLUSTER SYNCSLOTS FINISH` now
rejects clients outside the slot migration stream, preventing misuse of
the import state machine | Reject `CLUSTER SYNCSLOTS FINISH` from
clients that are not part of the slot migration replication stream,
preventing them from terminating a slot import |
| #4670 | `9.2` (Valkey 9.2.0-rc1) | Reject a repeated `CLUSTER
SYNCSLOTS ESTABLISH` on the same connection, which could lead to a
use-after-free crash on disconnect | Fix a use-after-free crash when
`CLUSTER SYNCSLOTS ESTABLISH` is sent twice on the same connection |
| #4665 | `9.2` (Valkey 9.2.0-rc1) | Fix `SORT` key extraction so a
`STORE` destination named like an option can no longer bypass ACL checks
and write to an unauthorized key | Fix `SORT` checking ACL key
permissions against the wrong key when a `STORE` destination is named
like an option (`by`, `get`, `limit`, `store`), which allowed writes
outside a user's allowed key patterns |
| #4777 | `9.2` (Valkey 9.2.0-rc2) | Fix `GEOSEARCH` returning empty
results for exact zero-distance matches on builds where floating-point
contraction breaks the latitude distance calculation | Fix `GEOSEARCH`
with a zero radius or box returning no results on some builds due to
floating-point precision when latitudes are equal |
| #5109 | `9.2` (Valkey 9.2.0-rc2) | Fix a memory leak when deleting or
replacing Lua functions with long names or descriptions | Fix a memory
leak when deleting or replacing Lua functions that have a long name or
description |
| #5187 | `9.2` (Valkey 9.2.0-rc2) | Fix a crash when a replication role
change command such as `REPLICAOF` or `CLUSTER REPLICATE` arrives over a
replication link | Fix a crash when `REPLICAOF`, `CLUSTER REPLICATE`,
`CLUSTER RESET` or `CLUSTER FAILOVER TAKEOVER` is received over a
replication link |
| #5182 | `9.2` (Valkey 9.2.0-rc2) | Fix a crash on the importing
primary when an atomic slot migration fails while its writes are paused
| Fix an assertion crash on a primary when an atomic slot migration
import fails while its writes are paused |
| #5180 | `9.2` (Valkey 9.2.0-rc2) | Redact credentials of rejected
`HELLO`, `AUTH` and `MIGRATE` commands so passwords no longer leak to
MONITOR and the commandlog | Fix credentials of rejected `HELLO`, `AUTH`
and `MIGRATE` commands being shown in clear text in `MONITOR` and the
commandlog |
| #5126 | `9.2` (Valkey 9.2.0-rc2) | Prevent a replica crash when the
primary wrongly replies +CONTINUE to a full resync request; the replica
now drops the link and retries | Fix a replica crash when the primary
replies `+CONTINUE` to a `PSYNC` full resync request and there is no
cached primary |
| #5114 | `9.2` (Valkey 9.2.0-rc2) | FUNCTION LOAD no longer aborts the
server when a library calls `server.log()` at its top level, including
when loading from RDB or AOF | Fix a crash when a Lua function library
calls `server.log()` at its top level during `FUNCTION LOAD` or when
loaded from RDB or AOF at startup |
| #5151 | `9.2` (Valkey 9.2.0-rc2) | Fix a stack buffer overflow when
replying with hundreds of empty strings (e.g. MGET) while reply copy
avoidance is active | Fix a stack buffer overflow when a reply such as
`MGET` contains hundreds of empty strings while reply copy avoidance is
active |
| #5137 | `9.2` (Valkey 9.2.0-rc2) | Ignore invalid ping extension
values from cluster peers that would corrupt nodes.conf and prevent the
node from restarting | Ignore invalid hostname, nodename, client IP and
availability zone values announced by cluster bus peers, which corrupted
nodes.conf and made the node panic on restart |
| #5161 | `9.2` (Valkey 9.2.0-rc2) | Bound the bytes the cluster bus
reads per event so a peer with a constant read backlog cannot starve
clients, cron and heartbeats | Limit the bytes read per event from a
cluster bus link so a peer that keeps sending cannot block the main
thread and starve clients |
| #5208 | `9.2` (Valkey 9.2.0-rc2) | Correct `SENTINEL SIMULATE-FAILURE`
metadata so `COMMAND DOCS` shows the required mode argument and its
tokens | Fix `SENTINEL SIMULATE-FAILURE` argument metadata so `COMMAND
DOCS` reports the mode as required and includes the option tokens |
| #5158 | `7.2` (Valkey 7.2.16) | Fail `CONFIG REWRITE` when the old
config file reads short instead of writing uninitialized memory into the
new config file | Fix `CONFIG REWRITE` writing uninitialized memory into
the config file when the old config file reads short; the rewrite now
fails with an error |
| #5245 | `9.2` (Valkey 9.2.0-rc2) | Mark the absolute timestamp
arguments of `HEXPIREAT` and `HPEXPIREAT` as `unix-time` in `COMMAND
DOCS`, matching `EXPIREAT` and `PEXPIREAT` | Fix `COMMAND DOCS`
reporting the `HEXPIREAT` and `HPEXPIREAT` timestamp arguments as
`integer` instead of `unix-time` |
| #5129 | `9.2` (Valkey 9.2.0-rc2) | Clear the script debugger input
buffer after a "max client buffer reached" error so later debugger
commands in the same session do not keep failing | Fix the script
debugger failing every further command after its 1 MB input limit is hit
and the script catches the error with `pcall` |
| #4929 | `7.2` (Valkey 7.2.16) | Fix a Sentinel crash when a monitored
replica's `INFO` reply contains no `master_host` | Fix a Sentinel crash
when a monitored replica's INFO reply has a matching primary port but no
primary host |
| #4711 | `7.2` (Valkey 7.2.16) | Fix a use-after-free in streams when
`XADD` creates a new node, which could leave a dangling pointer hit by
later reads such as `XRANGE` | Fix a use-after-free in streams where
`XADD` creating a new node can leave a dangling pointer later read by
`XRANGE`, `XREVRANGE` or `XINFO STREAM ... FULL` |
| #5065 | `7.2` (Valkey 7.2.16) | Reject inbound cluster bus packets
larger than 16MB, except Pub/Sub and module messages, so a peer cannot
make a node buffer up to 4GB from a single header | Reject inbound
cluster bus packets over 16MB, except Pub/Sub and module messages, so a
peer can no longer make a node buffer up to 4GB |
| #4983 | `7.2` (Valkey 7.2.16) | Fix `XINFO GROUPS` and `XINFO STREAM
... FULL` reporting too-high consumer group lag after `XTRIM` or a
trimming `XADD` removes unread entries | Fix `XINFO GROUPS` and `XINFO
STREAM ... FULL` reporting a too-high consumer group lag after `XTRIM`
or a trimming `XADD` removes unread entries |
| #5349 | `7.2` (Valkey 7.2.16) | Fix AOF load failure after a crash
leaves a torn annotation at the end of the file; it is now treated as a
short read and can be truncated by `aof-load-truncated` or
`valkey-check-aof --fix` | Fix AOF load failure after a torn annotation
at the end of the file by treating it as a short read, which
`valkey-check-aof --fix` can now truncate |
| #5246 | `7.2` (Valkey 7.2.16) | Correct the `SENTINEL
GET-MASTER-ADDR-BY-NAME` reply schema to allow the null reply returned
for an unknown primary name | Fix the reply schemas of `SENTINEL
GET-PRIMARY-ADDR-BY-NAME` and `SENTINEL GET-MASTER-ADDR-BY-NAME` to
include the null reply for an unknown primary |
| #5244 | `9.2` (Valkey 9.2.0-rc2) | Correct `ZADD` and `LCS` metadata
so `COMMAND DOCS` and valkey-cli hints no longer present `NX` with
`GT`/`LT` or `LEN` with `IDX` as valid combinations | Fix `COMMAND DOCS`
and `valkey-cli` hints presenting `ZADD` NX with GT or LT and `LCS` LEN
with IDX as valid combinations |

</details>

*Generated by valkey-ci-agent. Review before merging into the release
line.*

Signed-off-by: valkeyrie-bot[bot] <3692572+valkeyrie-bot[bot]@users.noreply.github.com>
Co-authored-by: valkeyrie-bot[bot] <3692572+valkeyrie-bot[bot]@users.noreply.github.com>
sarthakaggarwal97 pushed a commit that referenced this pull request Nov 18, 2026
SORT and SORT_RO kept the prefix, element, and postfix lengths in
`lookupKeyByPattern()` (`src/sort.c:72`) as `int`. When the substituted
element is ≥ 2^31 bytes, assigning `sdslen(element)` to `int` wraps to a
negative value; the sum passed to `createStringObject()` sign-extends to
~2^64 as `size_t`, and the allocator aborts the process. Changing the
four variables to `size_t` keeps the arithmetic in the unsigned domain.

Signed-off-by: Madelyn Olson <[email protected]>
Backport-Source-PR: 5146
@valkeyrie-ops valkeyrie-ops Bot moved this from To be backported to Done in Valkey 8.1 Nov 18, 2026
sarthakaggarwal97 pushed a commit that referenced this pull request Nov 18, 2026
SORT and SORT_RO kept the prefix, element, and postfix lengths in
`lookupKeyByPattern()` (`src/sort.c:72`) as `int`. When the substituted
element is ≥ 2^31 bytes, assigning `sdslen(element)` to `int` wraps to a
negative value; the sum passed to `createStringObject()` sign-extends to
~2^64 as `size_t`, and the allocator aborts the process. Changing the
four variables to `size_t` keeps the arithmetic in the unsigned domain.

Signed-off-by: Madelyn Olson <[email protected]>
Backport-Source-PR: 5146
@valkeyrie-ops valkeyrie-ops Bot moved this from To be backported to Done in Valkey 8.0 Nov 18, 2026
sarthakaggarwal97 pushed a commit that referenced this pull request Nov 18, 2026
SORT and SORT_RO kept the prefix, element, and postfix lengths in
`lookupKeyByPattern()` (`src/sort.c:72`) as `int`. When the substituted
element is ≥ 2^31 bytes, assigning `sdslen(element)` to `int` wraps to a
negative value; the sum passed to `createStringObject()` sign-extends to
~2^64 as `size_t`, and the allocator aborts the process. Changing the
four variables to `size_t` keeps the arithmetic in the unsigned domain.

Signed-off-by: Madelyn Olson <[email protected]>
Backport-Source-PR: 5146
@valkeyrie-ops valkeyrie-ops Bot moved this from To be backported to Done in Valkey 9.0 Nov 18, 2026
doonga pushed a commit to greyrock-labs/home-ops that referenced this pull request Nov 19, 2026
…(#839)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [docker.io/valkey/valkey](https://github.com/valkey-io/valkey) | patch | `9.1.3-alpine` → `9.1.4-alpine` |

---

### Release Notes

<details>
<summary>valkey-io/valkey (docker.io/valkey/valkey)</summary>

### [`v9.1.4`](https://github.com/valkey-io/valkey/releases/tag/9.1.4)

[Compare Source](valkey-io/valkey@9.1.3...9.1.4)

## Valkey 9.1.4  -  Released Wed 18 November 2026

Upgrade urgency SECURITY: This release includes security fixes we recommend you apply as soon as possible.

##### Security Fixes

- CVE-2026-130822: Fix a use-after-free crash in client eviction when maxmemory-clients is enabled by [@&#8203;nadav-levanoni](https://github.com/nadav-levanoni) ([#&#8203;5435](valkey-io/valkey#5435))

##### Bug Fixes

- Fix a crash when a key with a name of 2 GiB or more is sampled for eviction, and incorrect comparison of strings that large by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5133](valkey-io/valkey#5133))
- Correct command metadata to describe the `ZINCRBY` increment and `ZINTER`/`ZINTERSTORE`/`ZUNION`/`ZUNIONSTORE` weights as doubles instead of integers by [@&#8203;sarthakaggarwal97](https://github.com/sarthakaggarwal97) ([#&#8203;5210](valkey-io/valkey#5210))
- Propagate `PFADD` elements applied before a corrupted-HLL INVALIDOBJ error so replicas and the AOF stay consistent with the primary by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5128](valkey-io/valkey#5128))
- Fix a server crash in `SCRIPT DEBUG SYNC` mode when a debugger command arrives in more than one read by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5127](valkey-io/valkey#5127))
- Correct command metadata so the `numfields` count argument of hash field commands is no longer associated with a key specification by [@&#8203;sarthakaggarwal97](https://github.com/sarthakaggarwal97) ([#&#8203;5211](valkey-io/valkey#5211))
- Correct expiry command metadata to show that `XX` can be combined with `GT` or `LT`, rather than all four conditions being mutually exclusive by [@&#8203;sarthakaggarwal97](https://github.com/sarthakaggarwal97) ([#&#8203;5213](valkey-io/valkey#5213))
- Fix a server panic when a Lua script returns or raises an error table whose metatable has an `__index` metamethod that raises an error by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5118](valkey-io/valkey#5118))
- Fix a server crash when a module never sets a postponed reply length; the leftover placeholder is now filled with an empty array by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5159](valkey-io/valkey#5159))
- Fix a crash when processing a heartbeat from a cluster node whose role is locally unknown, such as after loading an incomplete nodes.conf by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;4091](valkey-io/valkey#4091))
- Mark the `RESTORE` and `RESTORE-ASKING` `IDLETIME` and `FREQ` options as mutually exclusive in command metadata by [@&#8203;sarthakaggarwal97](https://github.com/sarthakaggarwal97) ([#&#8203;5212](valkey-io/valkey#5212))
- Fix a crash in a cluster replica whose primary was removed from the nodes table when another primary claims an unassigned slot by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5184](valkey-io/valkey#5184))
- Fix `SCRIPT KILL` and `FUNCTION KILL` not stopping Lua scripts that loop inside nested coroutines, and script timeouts not being detected when work is spread across coroutines by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5108](valkey-io/valkey#5108))
- Fix an out-of-bounds write in `PFADD` and `PFMERGE` on a corrupted sparse HyperLogLog ending in a truncated XZERO opcode by rejecting it as invalid by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5124](valkey-io/valkey#5124))
- Fix a server abort in `PFADD` and `PFMERGE` on short sparse HyperLogLogs when `hll-sparse-max-bytes` is set to 31 or less by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5138](valkey-io/valkey#5138))
- Fix a server crash in `SORT` and `SORT_RO` with `BY` or `GET` patterns when an element is 2 GiB or larger by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5146](valkey-io/valkey#5146))
- Fix `ValkeyModule_Calloc` and `ValkeyModule_TryCalloc` returning an undersized buffer when `nmemb * size` overflows by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5155](valkey-io/valkey#5155))
- Fix `ValkeyModule_CallReplyAttributeElement` always returning an error on RESP3 attribute replies by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5157](valkey-io/valkey#5157))
- Fix `EXEC` succeeding after a key that was already expired at `WATCH` time is overwritten, which can happen on replicas by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5169](valkey-io/valkey#5169))
- Fix a memory leak when `server.register_function` named arguments are repeated in a different letter case by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5120](valkey-io/valkey#5120))
- Fix quadratic slowdown in `HRANDFIELD` and `SRANDMEMBER` with counts on collections whose elements differ only in letter case by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5167](valkey-io/valkey#5167))
- Fix `PFMERGE` with no source keys bypassing ACL key permissions and failing in `COMMAND GETKEYS`, and a crash in module commands whose keynum key spec starts past the last argument by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5087](valkey-io/valkey#5087))
- Fix `HSETEX` and `MSETEX` with a repeated EX, PX or EXAT option being rejected by replicas and lost on AOF reload by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5088](valkey-io/valkey#5088))
- Fix a memory leak when a script or module command is refused by ACL while the ACL log is disabled with `acllog-max-len 0` by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5162](valkey-io/valkey#5162))
- Fix a crash on the first `FUNCTION LOAD` after startup when the shebang engine name contains a NUL byte by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5115](valkey-io/valkey#5115))
- Fix an active defrag crash when a large set, sorted set or list is replaced by a hashtable-encoded hash while it is being defragmented by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5164](valkey-io/valkey#5164))
- Fix `FCALL` errors or a crash when `FUNCTION FLUSH SYNC` runs before the lazy free triggered by `FUNCTION RESTORE` of more than 64 functions has completed by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5105](valkey-io/valkey#5105))
- Fix long stalls in `SRANDMEMBER`, `ZRANDMEMBER`, `HRANDFIELD` and `SPOP` on a small key whose hashtable is still shrinking from a much larger size by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5170](valkey-io/valkey#5170))
- Fix `notify-keyspace-events` dropping the `n` (new key) flag from `CONFIG GET` and `CONFIG REWRITE` when `A` is also set by [@&#8203;pirate329](https://github.com/pirate329) ([#&#8203;5199](valkey-io/valkey#5199))
- Fix a crash when the Lua debugger is started on an empty or newline-only script by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5117](valkey-io/valkey#5117))
- Fix a cluster node failing to restart with an assertion after a gossip entry carrying the MYSELF flag adds a second myself node to nodes.conf by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5134](valkey-io/valkey#5134))
- Fix `ACL LOAD` not disconnecting default user clients subscribed to channels the reloaded rules no longer allow by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5085](valkey-io/valkey#5085))
- Fix an active defrag crash when a database is replaced by an async `FLUSHDB`/`FLUSHALL`, `SWAPDB` or a replica full sync while a large key is being defragmented by [@&#8203;taham0](https://github.com/taham0) ([#&#8203;4968](valkey-io/valkey#4968))
- Allow modules to block RESP3 clients that are subscribed to Pub/Sub channels instead of failing `ValkeyModule_BlockClient` with ENOTSUP by [@&#8203;quanyeyang](https://github.com/quanyeyang) ([#&#8203;4863](valkey-io/valkey#4863))
- Bound the time spent per cycle evicting keys from the client tracking table, avoiding long stalls after lowering `tracking-table-max-keys` by [@&#8203;tanmayBeginsJourney](https://github.com/tanmayBeginsJourney) ([#&#8203;4775](valkey-io/valkey#4775))
- Reclaim client-side caching tracking table entries left by disconnected clients, fixing a memory leak under read-heavy workloads, and include the tracking table in active defrag by [@&#8203;rayjinghaolei](https://github.com/rayjinghaolei) ([#&#8203;4190](valkey-io/valkey#4190))
- Fix a memory leak when `GEOSEARCH` or `GEOSEARCHSTORE` is given repeated `BYPOLYGON` options by [@&#8203;charsyam](https://github.com/charsyam) ([#&#8203;4995](valkey-io/valkey#4995))
- Fix a memory leak in `ValkeyModule_GetCommandKeysWithFlags` when introspecting commands with large key lists by [@&#8203;christopherlim98](https://github.com/christopherlim98) ([#&#8203;5046](valkey-io/valkey#5046))
- `MEMORY USAGE` now counts hash fields that have expired but not yet been reaped, fixing under-reported sizes by [@&#8203;sushilpaneru1](https://github.com/sushilpaneru1) ([#&#8203;5092](valkey-io/valkey#5092))
- Fix a crash in `ValkeyModule_Call` when script-mode validation fails and error replies were not requested by [@&#8203;dvkashapov](https://github.com/dvkashapov) ([#&#8203;5091](valkey-io/valkey#5091))
- In cluster mode, one cross-slot command in a script no longer makes every later script and function call fail until restart by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5191](valkey-io/valkey#5191))
- Fix a TLS busy loop that consumed 100% CPU when a connection's read or write handler was removed while OpenSSL was waiting for the opposite event by [@&#8203;yairgott](https://github.com/yairgott) ([#&#8203;3510](valkey-io/valkey#3510))
- Fix a crash caused by a NULL pointer dereference when all timer events in an event loop are pending deletion by [@&#8203;royenheart](https://github.com/royenheart) ([#&#8203;4351](valkey-io/valkey#4351))
- Fix a node staying stuck in PFAIL when its PING is lost while the peer's own traffic keeps the cluster link alive by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;4171](valkey-io/valkey#4171))
- `CLUSTER SYNCSLOTS FINISH` now rejects clients outside the slot migration stream, preventing misuse of the import state machine by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;4330](valkey-io/valkey#4330))
- Reject a repeated `CLUSTER SYNCSLOTS ESTABLISH` on the same connection, which could lead to a use-after-free crash on disconnect by [@&#8203;Pyolar](https://github.com/Pyolar) ([#&#8203;4670](valkey-io/valkey#4670))
- Fix `SORT` key extraction so a `STORE` destination named like an option can no longer bypass ACL checks and write to an unauthorized key by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;4665](valkey-io/valkey#4665))
- Fix `GEOSEARCH` returning empty results for exact zero-distance matches on builds where floating-point contraction breaks the latitude distance calculation by [@&#8203;Baraa-Hasheesh](https://github.com/Baraa-Hasheesh) ([#&#8203;4777](valkey-io/valkey#4777))
- Fix a memory leak when deleting or replacing Lua functions with long names or descriptions by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5109](valkey-io/valkey#5109))
- Fix a crash when a replication role change command such as `REPLICAOF` or `CLUSTER REPLICATE` arrives over a replication link by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5187](valkey-io/valkey#5187))
- Fix a crash on the importing primary when an atomic slot migration fails while its writes are paused by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5182](valkey-io/valkey#5182))
- Fix `XADD` rejected for oversized elements leaving an empty stream on the primary that is not propagated to replicas or the AOF by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5178](valkey-io/valkey#5178))
- Redact credentials of rejected `HELLO`, `AUTH` and `MIGRATE` commands so passwords no longer leak to MONITOR and the commandlog by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5180](valkey-io/valkey#5180))
- Prevent a replica crash when the primary wrongly replies +CONTINUE to a full resync request; the replica now drops the link and retries by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5126](valkey-io/valkey#5126))
- FUNCTION LOAD no longer aborts the server when a library calls `server.log()` at its top level, including when loading from RDB or AOF by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5114](valkey-io/valkey#5114))
- Fix an integer overflow in the list node merge size check that could crash the server on `LSET` after loading a list with a near-4GiB node via `RESTORE` or full sync by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5163](valkey-io/valkey#5163))
- Fix a stack buffer overflow when replying with hundreds of empty strings (e.g. MGET) while reply copy avoidance is active by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5151](valkey-io/valkey#5151))
- Ignore invalid ping extension values from cluster peers that would corrupt nodes.conf and prevent the node from restarting by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5137](valkey-io/valkey#5137))
- Bound the bytes the cluster bus reads per event so a peer with a constant read backlog cannot starve clients, cron and heartbeats by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5161](valkey-io/valkey#5161))
- Correct `SENTINEL SIMULATE-FAILURE` metadata so `COMMAND DOCS` shows the required mode argument and its tokens by [@&#8203;sarthakaggarwal97](https://github.com/sarthakaggarwal97) ([#&#8203;5208](valkey-io/valkey#5208))
- Fail `CONFIG REWRITE` when the old config file reads short instead of writing uninitialized memory into the new config file by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5158](valkey-io/valkey#5158))
- Mark the absolute timestamp arguments of `HEXPIREAT` and `HPEXPIREAT` as `unix-time` in `COMMAND DOCS`, matching `EXPIREAT` and `PEXPIREAT` by [@&#8203;rainsupreme](https://github.com/rainsupreme) ([#&#8203;5245](valkey-io/valkey#5245))
- Clear the script debugger input buffer after a "max client buffer reached" error so later debugger commands in the same session do not keep failing by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5129](valkey-io/valkey#5129))
- Fix a Sentinel crash when a monitored replica's `INFO` reply contains no `master_host` by [@&#8203;smkher](https://github.com/smkher) ([#&#8203;4929](valkey-io/valkey#4929))
- Fix Lua `server.error_reply()` returning stale heap memory as the error message when given a string of 2 GiB or more by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5122](valkey-io/valkey#5122))
- Fix a use-after-free in streams when `XADD` creates a new node, which could leave a dangling pointer hit by later reads such as `XRANGE` by [@&#8203;Baraa-Hasheesh](https://github.com/Baraa-Hasheesh) ([#&#8203;4711](valkey-io/valkey#4711))
- Reject inbound cluster bus packets larger than 16MB, except Pub/Sub and module messages, so a peer cannot make a node buffer up to 4GB from a single header by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5065](valkey-io/valkey#5065))
- Fix `XINFO GROUPS` and `XINFO STREAM ... FULL` reporting too-high consumer group lag after `XTRIM` or a trimming `XADD` removes unread entries by [@&#8203;Sasidharan3094](https://github.com/Sasidharan3094) ([#&#8203;4983](valkey-io/valkey#4983))
- Fix shutdown-triggered failover promoting a replica that has `cluster-replica-no-failover yes` by [@&#8203;simonasr](https://github.com/simonasr) ([#&#8203;5033](valkey-io/valkey#5033))
- Fix AOF load failure after a crash leaves a torn annotation at the end of the file; it is now treated as a short read and can be truncated by `aof-load-truncated` or `valkey-check-aof --fix` by [@&#8203;sumitk163](https://github.com/sumitk163) ([#&#8203;5349](valkey-io/valkey#5349))
- Correct the `SENTINEL GET-MASTER-ADDR-BY-NAME` reply schema to allow the null reply returned for an unknown primary name by [@&#8203;rainsupreme](https://github.com/rainsupreme) ([#&#8203;5246](valkey-io/valkey#5246))
- Fix Sentinel counting stale primary-down reports from peers toward quorum, which could trigger an unwanted failover of a healthy primary by [@&#8203;akasakariko](https://github.com/akasakariko) ([#&#8203;4913](valkey-io/valkey#4913))
- Fix Lua `server.log()` blocking the server for seconds when called with thousands of arguments, with no `-BUSY` reply or `SCRIPT KILL` by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5104](valkey-io/valkey#5104))
- Fix `valkey-cli --cluster reshard` and `rebalance` exiting with a success status when slot migration fails by [@&#8203;imasahiro](https://github.com/imasahiro) ([#&#8203;4853](valkey-io/valkey#4853))
- Correct `ZADD` and `LCS` metadata so `COMMAND DOCS` and valkey-cli hints no longer present `NX` with `GT`/`LT` or `LEN` with `IDX` as valid combinations by [@&#8203;rainsupreme](https://github.com/rainsupreme) ([#&#8203;5244](valkey-io/valkey#5244))

##### Build and Tooling

- Fix clean or highly parallel builds failing with a missing release.h for valkey-cli, valkey-benchmark, and unit tests by [@&#8203;poiuj](https://github.com/poiuj) ([#&#8203;3683](valkey-io/valkey#3683))

**Full Changelog**: <valkey-io/valkey@9.1.3...9.1.4>

</details>

---

### Configuration

📅 **Schedule**: (in timezone America/New_York)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yNDMuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjI0My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL3BhdGNoIl19-->

Reviewed-on: https://git.greyrock.io/todd/home-ops/pulls/839
rogerrum pushed a commit to rogerrum/k8s-gitops that referenced this pull request Nov 24, 2026
…0 ) (#3831)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [ghcr.io/valkey-io/valkey](https://github.com/valkey-io/valkey) | minor | `9.1.3` → `9.2.0` |

---

### Release Notes

<details>
<summary>valkey-io/valkey (ghcr.io/valkey-io/valkey)</summary>

### [`v9.2.0`](https://github.com/valkey-io/valkey/releases/tag/9.2.0)

[Compare Source](https://github.com/valkey-io/valkey/compare/9.1.4...9.2.0)

## Valkey 9.2.0 GA  -  Released Wed 18 November 2026

Upgrade urgency LOW: This is the first stable release of Valkey 9.2.

##### Behavior Changes

- `ZRANGEBYSCORE`, `ZREVRANGEBYSCORE`, `ZCOUNT`, and `ZRANGESTORE` now reject a bare `(` or an empty string as a score bound instead of silently treating it as 0 by [@&#8203;AlisinaDevelo](https://github.com/AlisinaDevelo) ([#&#8203;4054](https://github.com/valkey-io/valkey/issues/4054))
- Path Hash deletion commands now remove the key when the last path is deleted, following the Hash key lifecycle and emitting a generic del event by [@&#8203;yangbodong22011](https://github.com/yangbodong22011) ([#&#8203;5068](https://github.com/valkey-io/valkey/issues/5068))
- Active expiration of keys and hash fields now increments the dirty counter, so save points (and thus BGSAVE) may trigger more often by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;3118](https://github.com/valkey-io/valkey/issues/3118))

##### New Features and Enhanced Behavior

- Add new `DELEX` command to conditionally delete a string key when its value matches (`IFEQ`) or differs from (`IFNE`) a given value by [@&#8203;lightsigma96](https://github.com/lightsigma96) ([#&#8203;4607](https://github.com/valkey-io/valkey/issues/4607))
- Add Zstd as a streaming compression codec for RDB persistence and replication, offering better compression ratios than LZ4 by [@&#8203;sarthakaggarwal97](https://github.com/sarthakaggarwal97) ([#&#8203;3798](https://github.com/valkey-io/valkey/issues/3798))
- Support streaming-compressed RDB preambles in AOF bases, so compressed full-sync RDB files can be reused directly as AOF bases by [@&#8203;sarthakaggarwal97](https://github.com/sarthakaggarwal97) ([#&#8203;4754](https://github.com/valkey-io/valkey/issues/4754))
- `ACL GENPASS` and the hash function seed draw randomness from the configured OpenSSL 3 provider when built with TLS, supporting deployments that require a validated crypto module by [@&#8203;MarkAtwood](https://github.com/MarkAtwood) ([#&#8203;4339](https://github.com/valkey-io/valkey/issues/4339))
- Support forkless full synchronization to replicas, serving disk and diskless full syncs from a background-thread snapshot without forking by [@&#8203;nitaicaro](https://github.com/nitaicaro) ([#&#8203;4797](https://github.com/valkey-io/valkey/issues/4797))
- Add ACL DIGEST command that returns a fingerprint of the ACL rules currently in effect, useful to verify what ACL LOAD applied by [@&#8203;melancholictheory](https://github.com/melancholictheory) ([#&#8203;4446](https://github.com/valkey-io/valkey/issues/4446))
- Add forkless RDB snapshots, opt-in via the new `forkless-infrastructure-enabled` and `bgsave-default-method` configs, with new INFO persistence fields reporting the save method and progress by [@&#8203;JimB123](https://github.com/JimB123) ([#&#8203;4460](https://github.com/valkey-io/valkey/issues/4460))
- Add the `XACKDEL` and `XDELEX` stream commands with `KEEPREF`, `DELREF` and `ACKED` modes to acknowledge and delete messages once consumer groups no longer need them by [@&#8203;nickiaq](https://github.com/nickiaq) ([#&#8203;4629](https://github.com/valkey-io/valkey/issues/4629))
- Support a secondary server certificate via `tls-alt-cert-file`, `tls-alt-key-file` and `tls-alt-key-file-pass`, e.g. a post-quantum certificate alongside RSA, with matching INFO TLS fields by [@&#8203;pkhartsk](https://github.com/pkhartsk) ([#&#8203;3717](https://github.com/valkey-io/valkey/issues/3717))
- Add ACL roles: named, reusable sets of ACL selectors managed with `ACL SETROLE`/`DELROLE`/`GETROLE`/`ROLES` and assigned to users with `role:<name>`, in commands, the ACL file and valkey.conf by [@&#8203;yang-z-o](https://github.com/yang-z-o) ([#&#8203;3967](https://github.com/valkey-io/valkey/issues/3967))
- Add a `maxmemory-scripts` config to limit memory used by cached `EVAL` scripts, and mark `SCRIPT LOAD` as DENYOOM so it respects the global maxmemory limit by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;866](https://github.com/valkey-io/valkey/issues/866))
- Add Path Hash, a new radix-tree-backed data type with `PH*` commands for exact lookup, longest-prefix matching, and prefix traversal over binary-safe paths by [@&#8203;yangbodong22011](https://github.com/yangbodong22011) ([#&#8203;4506](https://github.com/valkey-io/valkey/issues/4506))
- Support whole-stream LZ4 compression of RDB files via the new `rdbcompression lz4` option; the default per-string LZF behavior is unchanged by [@&#8203;sarthakaggarwal97](https://github.com/sarthakaggarwal97) ([#&#8203;3531](https://github.com/valkey-io/valkey/issues/3531))
- Add server-side hot key detection with new `HOTKEYS GET`/`RESET` commands, enabled by setting `hotkeys-top-k` by [@&#8203;alon-arenberg](https://github.com/alon-arenberg) ([#&#8203;3708](https://github.com/valkey-io/valkey/issues/3708))
- Add optional replication throttling (`repl-throttling-enabled`) that slows client writes when a replica falls behind, avoiding disconnects and full syncs by [@&#8203;harrylin98](https://github.com/harrylin98) ([#&#8203;4356](https://github.com/valkey-io/valkey/issues/4356))
- Prioritize system-critical events (cluster heartbeats, replication, slot migration) over heavy client traffic, tunable via the new `priority-preemptive-poll-interval-us` config by [@&#8203;satheeshaGowda](https://github.com/satheeshaGowda) ([#&#8203;4076](https://github.com/valkey-io/valkey/issues/4076))
- Reserve connection slots for administrative clients: connections from the CIDR ranges listed in the new `priority-subnets` config are tagged as prioritized, `maxclients-reserved` caps normal clients at `maxclients` minus that many slots, and `INFO clients` reports `connected_priority_clients` by [@&#8203;satheeshaGowda](https://github.com/satheeshaGowda) ([#&#8203;4005](https://github.com/valkey-io/valkey/issues/4005))
- Add `INCREX` command to atomically increment a key by an integer or float while setting its expiration, with `NX`/`XX` conditions by [@&#8203;GavinDmello](https://github.com/GavinDmello) ([#&#8203;3253](https://github.com/valkey-io/valkey/issues/3253))

##### Performance and Efficiency Improvements

- Fix long stalls in `SRANDMEMBER`, `ZRANDMEMBER`, `HRANDFIELD` and `SPOP` on a small key whose hashtable is still shrinking from a much larger size by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5170](https://github.com/valkey-io/valkey/issues/5170))
- Stop treating `LINDEX`, `LRANGE` and `LPOS` as format-changing commands during forkless background iteration, so list reads no longer get write-style handling by [@&#8203;JimB123](https://github.com/JimB123) ([#&#8203;5283](https://github.com/valkey-io/valkey/issues/5283))
- Keep the forkless save queue growing under write load by not counting keys expedited by writes as leftover work by [@&#8203;taham0](https://github.com/taham0) ([#&#8203;5298](https://github.com/valkey-io/valkey/issues/5298))
- Make BCAST client tracking cost scale with the prefixes a key matches instead of all registered prefixes, so many unmatched prefixes no longer slow writes and the event loop by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5183](https://github.com/valkey-io/valkey/issues/5183))
- Reclaim memory from sorted sets that shrink or have frequent score updates by compacting sparse B+tree leaves on delete by [@&#8203;rainsupreme](https://github.com/rainsupreme) ([#&#8203;4526](https://github.com/valkey-io/valkey/issues/4526))
- Speed up sorted set score updates in listpack encoding by replacing the score in place when the member keeps its position by [@&#8203;charsyam](https://github.com/charsyam) ([#&#8203;3491](https://github.com/valkey-io/valkey/issues/3491))
- Fix quadratic slowdown in `HRANDFIELD` and `SRANDMEMBER` with counts on collections whose elements differ only in letter case by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5167](https://github.com/valkey-io/valkey/issues/5167))
- Bound the time spent per cycle evicting keys from the client tracking table, avoiding long stalls after lowering `tracking-table-max-keys` by [@&#8203;tanmayBeginsJourney](https://github.com/tanmayBeginsJourney) ([#&#8203;4775](https://github.com/valkey-io/valkey/issues/4775))
- Speed up the `INFO` command by around 5% by pre-allocating the output buffer by [@&#8203;charsyam](https://github.com/charsyam) ([#&#8203;3413](https://github.com/valkey-io/valkey/issues/3413))
- Reclaim client-side caching tracking table entries left by disconnected clients, fixing a memory leak under read-heavy workloads, and include the tracking table in active defrag by [@&#8203;rayjinghaolei](https://github.com/rayjinghaolei) ([#&#8203;4190](https://github.com/valkey-io/valkey/issues/4190))
- Speed up `ZPOPMIN` and `ZPOPMAX` on B+tree encoded sorted sets by detaching edge items without a key search or copy by [@&#8203;charsyam](https://github.com/charsyam) ([#&#8203;4852](https://github.com/valkey-io/valkey/issues/4852))
- Counting a hash's fields with expirations is now O(1) for hashtable-encoded hashes by tracking the volatile set size on each mutation by [@&#8203;frostzt](https://github.com/frostzt) ([#&#8203;4829](https://github.com/valkey-io/valkey/issues/4829))
- Speed up AOF command propagation by serializing commands directly into the AOF buffer, removing an allocation and copy per command by [@&#8203;charsyam](https://github.com/charsyam) ([#&#8203;3496](https://github.com/valkey-io/valkey/issues/3496))
- Cache the earliest event-loop timer to avoid an O(N) scan per iteration, reducing overhead with many timers such as RDMA connections by [@&#8203;royenheart](https://github.com/royenheart) ([#&#8203;4354](https://github.com/valkey-io/valkey/issues/4354))
- Speed up HGETALL, HKEYS and HVALS with exact-length reply headers, fused bulk replies, and entry prefetching by [@&#8203;jjuleslasarte](https://github.com/jjuleslasarte) ([#&#8203;4417](https://github.com/valkey-io/valkey/issues/4417))
- Eliminate false sharing in per-thread memory usage counters, improving throughput with I/O threads on SMT x86 systems by [@&#8203;omerrubi-amzn](https://github.com/omerrubi-amzn) ([#&#8203;4107](https://github.com/valkey-io/valkey/issues/4107))
- Read-only list iteration (e.g. LRANGE, LPOS) no longer decompresses and recompresses quicklist nodes in place, cutting CPU cost on compressed lists by [@&#8203;murphyjacob4](https://github.com/murphyjacob4) ([#&#8203;4782](https://github.com/valkey-io/valkey/issues/4782))
- Speed up ZSCAN on btree-encoded sorted sets by avoiding temporary member and score copies and prefetching items by [@&#8203;charsyam](https://github.com/charsyam) ([#&#8203;4856](https://github.com/valkey-io/valkey/issues/4856))
- Reduce cache-line false sharing on IO thread activity and job counters for better multi-threaded IO performance by [@&#8203;omerrubi-amzn](https://github.com/omerrubi-amzn) ([#&#8203;4976](https://github.com/valkey-io/valkey/issues/4976))
- PHDELPREFIX now bounds its temporary path copies to 64KiB per batch, avoiding large untracked memory spikes on long shared prefixes by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5179](https://github.com/valkey-io/valkey/issues/5179))
- Speed up radix tree lookups and inserts by using SIMD-optimized memchr() for child-edge search by [@&#8203;charsyam](https://github.com/charsyam) ([#&#8203;3472](https://github.com/valkey-io/valkey/issues/3472))
- Improve replica processing speed by parsing multiple commands from the replication stream at once by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;3597](https://github.com/valkey-io/valkey/issues/3597))
- Reduce memory usage by sharing pubsub pattern and WATCH key objects across clients subscribing to or watching the same name by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;4072](https://github.com/valkey-io/valkey/issues/4072))
- Large sorted sets are now backed by a B+ tree instead of a skiplist; OBJECT ENCODING reports `btree` instead of `skiplist` by [@&#8203;ranshid](https://github.com/ranshid) ([#&#8203;4359](https://github.com/valkey-io/valkey/issues/4359))
- Save the cluster config file from a background thread when `cluster-config-save-behavior` is best-effort, avoiding main-thread latency spikes from slow disk I/O by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;2555](https://github.com/valkey-io/valkey/issues/2555))
- Speed up `HMGET`, `SMISMEMBER` and `ZMSCORE` on large hashtable-encoded keys with batched lookups that overlap memory accesses by [@&#8203;chzhoo](https://github.com/chzhoo) ([#&#8203;4017](https://github.com/valkey-io/valkey/issues/4017))
- Extend memory prefetching to hash, set and sorted set member lookups when io-threads are enabled, improving performance for 30 field/member commands on large keys by [@&#8203;roshkhatri](https://github.com/roshkhatri) ([#&#8203;3940](https://github.com/valkey-io/valkey/issues/3940))
- `MEMORY PURGE` now also releases free pages from the glibc main arena back to the OS, reclaiming memory held by libc-internal allocations by [@&#8203;webbsssss](https://github.com/webbsssss) ([#&#8203;3640](https://github.com/valkey-io/valkey/issues/3640))
- Speed up command propagation to replicas by batching each command's RESP frame into a single replication buffer write by [@&#8203;hpatro](https://github.com/hpatro) ([#&#8203;4044](https://github.com/valkey-io/valkey/issues/4044))
- Reduce lseek system calls during disk-based replication by seeking only when a write blocks or is partial by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;4053](https://github.com/valkey-io/valkey/issues/4053))
- Reduce event-loop overhead by refreshing cached daylight-saving info once per second instead of on every wakeup by [@&#8203;hpatro](https://github.com/hpatro) ([#&#8203;4086](https://github.com/valkey-io/valkey/issues/4086))
- Speed up keyspace event notifications by skipping work when there are no subscribers and avoiding unnecessary allocations by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;4285](https://github.com/valkey-io/valkey/issues/4285))
- Speed up exact `XTRIM MAXLEN = 0` by about 2.5x by clearing the whole stream in one step instead of removing entries individually by [@&#8203;sarthakaggarwal97](https://github.com/sarthakaggarwal97) ([#&#8203;4161](https://github.com/valkey-io/valkey/issues/4161))
- Cluster bus reads, writes, and inbound TLS accepts can now run on the shared I/O thread pool, with new `CLUSTER INFO` offload statistics by [@&#8203;hpatro](https://github.com/hpatro) ([#&#8203;3438](https://github.com/valkey-io/valkey/issues/3438))
- Small hashes with field expiration now use the memory-efficient listpack encoding instead of always converting to a hashtable by [@&#8203;frostzt](https://github.com/frostzt) ([#&#8203;3212](https://github.com/valkey-io/valkey/issues/3212))
- Reduce per-command overhead by skipping post-command bookkeeping when no propagation, module, or invalidation work is pending by [@&#8203;ahmetalicc](https://github.com/ahmetalicc) ([#&#8203;4257](https://github.com/valkey-io/valkey/issues/4257))

##### Bug Fixes

- Fix `PFMERGE` with no source keys bypassing ACL key permissions and failing in `COMMAND GETKEYS`, and a crash in module commands whose keynum key spec starts past the last argument by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5087](https://github.com/valkey-io/valkey/issues/5087))
- Fix `SCRIPT KILL` and `FUNCTION KILL` not stopping Lua scripts that loop inside nested coroutines, and script timeouts not being detected when work is spread across coroutines by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5108](https://github.com/valkey-io/valkey/issues/5108))
- Fix a server crash in `SORT` and `SORT_RO` with `BY` or `GET` patterns when an element is 2 GiB or larger by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5146](https://github.com/valkey-io/valkey/issues/5146))
- Fix `ValkeyModule_Calloc` and `ValkeyModule_TryCalloc` returning an undersized buffer when `nmemb * size` overflows by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5155](https://github.com/valkey-io/valkey/issues/5155))
- Fix `EXEC` succeeding after a key that was already expired at `WATCH` time is overwritten, which can happen on replicas by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5169](https://github.com/valkey-io/valkey/issues/5169))
- Fix a crash on the first `FUNCTION LOAD` after startup when the shebang engine name contains a NUL byte by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5115](https://github.com/valkey-io/valkey/issues/5115))
- Fix a crash in a cluster replica whose primary was removed from the nodes table when another primary claims an unassigned slot by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5184](https://github.com/valkey-io/valkey/issues/5184))
- Fix an active defrag crash when a large set, sorted set or list is replaced by a hashtable-encoded hash while it is being defragmented by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5164](https://github.com/valkey-io/valkey/issues/5164))
- Fix an out-of-bounds write in `PFADD` and `PFMERGE` on a corrupted sparse HyperLogLog ending in a truncated XZERO opcode by rejecting it as invalid by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5124](https://github.com/valkey-io/valkey/issues/5124))
- Fix a server abort in `PFADD` and `PFMERGE` on short sparse HyperLogLogs when `hll-sparse-max-bytes` is set to 31 or less by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5138](https://github.com/valkey-io/valkey/issues/5138))
- Fix forkless saves writing corrupted set members to the RDB when `ZUNION`, `ZINTER`, `ZINTERCARD` or `ZDIFF` reads the same set concurrently by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5110](https://github.com/valkey-io/valkey/issues/5110))
- Fix a crash when the Lua debugger is started on an empty or newline-only script by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5117](https://github.com/valkey-io/valkey/issues/5117))
- Fix a cluster node failing to restart with an assertion after a gossip entry carrying the MYSELF flag adds a second myself node to nodes.conf by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5134](https://github.com/valkey-io/valkey/issues/5134))
- Fix `ACL LOAD` not disconnecting default user clients subscribed to channels the reloaded rules no longer allow by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5085](https://github.com/valkey-io/valkey/issues/5085))
- Fix a Sentinel crash when a monitored replica's `INFO` reply contains no `master_host` by [@&#8203;smkher](https://github.com/smkher) ([#&#8203;4929](https://github.com/valkey-io/valkey/issues/4929))
- Fix throttled write commands being executed twice when using RDMA with IO threads by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5160](https://github.com/valkey-io/valkey/issues/5160))
- Fail `CONFIG REWRITE` when the old config file reads short instead of writing uninitialized memory into the new config file by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5158](https://github.com/valkey-io/valkey/issues/5158))
- Fix Lua `server.error_reply()` returning stale heap memory as the error message when given a string of 2 GiB or more by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5122](https://github.com/valkey-io/valkey/issues/5122))
- Fix a use-after-free in streams when `XADD` creates a new node, which could leave a dangling pointer hit by later reads such as `XRANGE` by [@&#8203;Baraa-Hasheesh](https://github.com/Baraa-Hasheesh) ([#&#8203;4711](https://github.com/valkey-io/valkey/issues/4711))
- Fix `XINFO GROUPS` and `XINFO STREAM ... FULL` reporting too-high consumer group lag after `XTRIM` or a trimming `XADD` removes unread entries by [@&#8203;Sasidharan3094](https://github.com/Sasidharan3094) ([#&#8203;4983](https://github.com/valkey-io/valkey/issues/4983))
- Fix forkless background iteration being left inside an open `MULTI` after a script or `MULTI`/`EXEC` when there are no replicas and AOF is off by [@&#8203;harrylin98](https://github.com/harrylin98) ([#&#8203;5316](https://github.com/valkey-io/valkey/issues/5316))
- Fix use of uninitialized variables in `valkey-cli` cluster key migration when `SELECT` fails on the source node by [@&#8203;PoisonGodv](https://github.com/PoisonGodv) ([#&#8203;5311](https://github.com/valkey-io/valkey/issues/5311))
- Fix an assertion failure when `FLUSHALL` or `SHUTDOWN` cancels a failed forkless save that still has a `FLUSHDB` or `SWAPDB` queued by [@&#8203;dgershko](https://github.com/dgershko) ([#&#8203;5326](https://github.com/valkey-io/valkey/issues/5326))
- Fix AOF load failure after a crash leaves a torn annotation at the end of the file; it is now treated as a short read and can be truncated by `aof-load-truncated` or `valkey-check-aof --fix` by [@&#8203;sumitk163](https://github.com/sumitk163) ([#&#8203;5349](https://github.com/valkey-io/valkey/issues/5349))
- Fix Lua `server.log()` blocking the server for seconds when called with thousands of arguments, with no `-BUSY` reply or `SCRIPT KILL` by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5104](https://github.com/valkey-io/valkey/issues/5104))
- Bound the number of memory regions the crash report's fast memory test records on Linux to avoid overflowing its region list by [@&#8203;JimB123](https://github.com/JimB123) ([#&#8203;5379](https://github.com/valkey-io/valkey/issues/5379))
- Fix a replica assertion when a timed-out script ends while the replication throttler holds the primary client, possible right after a failover with `repl-throttling-enabled yes` by [@&#8203;asagege](https://github.com/asagege) ([#&#8203;5389](https://github.com/valkey-io/valkey/issues/5389))
- Fix a primary assertion when `FLUSHDB` runs right at the end of a forkless full sync by [@&#8203;sarthakaggarwal97](https://github.com/sarthakaggarwal97) ([#&#8203;5365](https://github.com/valkey-io/valkey/issues/5365))
- Fix a primary assertion when a module thread holding the GIL performs a replicated write during a forkless save or full sync; affects modules that set `VALKEYMODULE_OPTIONS_HANDLE_FORKLESS` by [@&#8203;Baraa-Hasheesh](https://github.com/Baraa-Hasheesh) ([#&#8203;5432](https://github.com/valkey-io/valkey/issues/5432))
- Fix `CONFIG SET priority-subnets` demoting replica and slot migration connections from high priority, and fix drift in the active priority client counter by [@&#8203;satheeshaGowda](https://github.com/satheeshaGowda) ([#&#8203;4681](https://github.com/valkey-io/valkey/issues/4681))
- Fix a source primary assertion on the next `CLUSTER MIGRATESLOTS` and a pipe descriptor leak after a slot migration snapshot fails to fork, such as during a forkless BGSAVE by [@&#8203;Baraa-Hasheesh](https://github.com/Baraa-Hasheesh) ([#&#8203;5359](https://github.com/valkey-io/valkey/issues/5359))
- Fix excessive copy-on-write memory during fork-based saves and a data race in forkless saves under an LFU `maxmemory-policy` by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5445](https://github.com/valkey-io/valkey/issues/5445))
- Fix a use-after-free crash when a blocked client's re-executed command evicts the client still executing a command under `maxmemory-clients` by [@&#8203;nadav-levanoni](https://github.com/nadav-levanoni) ([#&#8203;5435](https://github.com/valkey-io/valkey/issues/5435))
- Fix access to a freed database when `FLUSHDB` and `SWAPDB` in the same transaction terminate a background iteration by [@&#8203;JimB123](https://github.com/JimB123) ([#&#8203;5462](https://github.com/valkey-io/valkey/issues/5462))
- Reject module write commands while the server is paused for writes, preventing a crash from module timer callbacks during `CLIENT PAUSE WRITE` or `CLUSTER FAILOVER` by [@&#8203;smkher](https://github.com/smkher) ([#&#8203;3645](https://github.com/valkey-io/valkey/issues/3645))
- Fix event loop busy-spinning on virtual machines by not using raw TSC for the monotonic clock when the kernel clocksource is not tsc by [@&#8203;quanyeyang](https://github.com/quanyeyang) ([#&#8203;4707](https://github.com/valkey-io/valkey/issues/4707))
- Fix a crash in `ValkeyModule_HashHasStringRef` on a missing or expired field and correct wrong return values in the hash stringRef module APIs by [@&#8203;ShubhamTaple](https://github.com/ShubhamTaple) ([#&#8203;4504](https://github.com/valkey-io/valkey/issues/4504))
- Fix a server abort on a RESTORE payload declaring a string length that overflows the allocation size; such payloads are now rejected as bad data by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;4733](https://github.com/valkey-io/valkey/issues/4733))
- Fix ZINTER/ZINTERSTORE returning input-order-dependent scores when a weighted term is 0\*inf; a NaN weighted score now counts as 0, matching ZUNION by [@&#8203;leomurillo](https://github.com/leomurillo) ([#&#8203;4997](https://github.com/valkey-io/valkey/issues/4997))
- Fix crashes, lookup hangs, and duplicate set members when keys or elements reach 2 GiB, caused by storing string lengths in a 32-bit integer by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5133](https://github.com/valkey-io/valkey/issues/5133))
- Fix module global defrag resuming on the wrong module or with a stale cursor when `MODULE UNLOAD` runs between defrag cycles by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5154](https://github.com/valkey-io/valkey/issues/5154))
- Propagate `PFADD` elements applied before a corrupted-HLL INVALIDOBJ error so replicas and the AOF stay consistent with the primary by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5128](https://github.com/valkey-io/valkey/issues/5128))
- Fix a server crash in `SCRIPT DEBUG SYNC` mode when a debugger command arrives split across more than one read by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5127](https://github.com/valkey-io/valkey/issues/5127))
- Fix a server panic when a Lua script returns or raises an error table whose metatable has an `__index` metamethod that raises an error by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5118](https://github.com/valkey-io/valkey/issues/5118))
- Fix forkless BGSAVE producing a corrupt snapshot when `SWAPDB` runs without being replicated, such as from a script with replication disabled by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5116](https://github.com/valkey-io/valkey/issues/5116))
- Let `FLUSHALL` and `SHUTDOWN` cancel a forkless save that is finalizing its file, so a stale snapshot can no longer overwrite the newer dump.rdb by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5121](https://github.com/valkey-io/valkey/issues/5121))
- Fix a server crash when a module never sets a postponed reply length; the leftover placeholder is now filled with an empty array by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5159](https://github.com/valkey-io/valkey/issues/5159))
- Fix a memory leak when `server.register_function` named arguments are repeated in a different letter case by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5120](https://github.com/valkey-io/valkey/issues/5120))
- Preserve expired but not yet reaped hash fields across listpack-to-hashtable conversion so their deletion is properly reaped and propagated by [@&#8203;frostzt](https://github.com/frostzt) ([#&#8203;4704](https://github.com/valkey-io/valkey/issues/4704))
- Fix a double-decremented item count when background iteration is terminated with a SWAPDB or FLUSHDB event queued by [@&#8203;JimB123](https://github.com/JimB123) ([#&#8203;4750](https://github.com/valkey-io/valkey/issues/4750))
- Fix `GEOSEARCH` returning empty results for exact zero-distance matches on builds where floating-point contraction breaks the latitude distance calculation by [@&#8203;Baraa-Hasheesh](https://github.com/Baraa-Hasheesh) ([#&#8203;4777](https://github.com/valkey-io/valkey/issues/4777))
- Reject inline commands containing a raw NUL byte with a protocol error instead of leaving the connection stalled by [@&#8203;cjx-zar](https://github.com/cjx-zar) ([#&#8203;4759](https://github.com/valkey-io/valkey/issues/4759))
- Fix a memory leak on normal shutdown caused by I/O worker threads not being terminated and cleaned up by [@&#8203;roshkhatri](https://github.com/roshkhatri) ([#&#8203;4710](https://github.com/valkey-io/valkey/issues/4710))
- `XACKDEL` with `KEEPREF` now replies 1 instead of -1 when acknowledging an entry whose stream message was already deleted, matching the ACKED and DELREF modes by [@&#8203;adityamukesh](https://github.com/adityamukesh) ([#&#8203;4843](https://github.com/valkey-io/valkey/issues/4843))
- Fix listpack encoding incompatibility that caused RDB load and replication failures for entries of certain lengths between 9.0 and 9.1.x by [@&#8203;jjuleslasarte](https://github.com/jjuleslasarte) ([#&#8203;4819](https://github.com/valkey-io/valkey/issues/4819))
- Reject relative expire times in `SET`/`GETEX`, `RESTORE`, and `ValkeyModule_SetExpire` that overflow when added to the current time, preventing server aborts from negative expires by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;4880](https://github.com/valkey-io/valkey/issues/4880))
- `ACL DIGEST` now includes role definitions, so editing a role's rules changes the reported fingerprint by [@&#8203;melancholictheory](https://github.com/melancholictheory) ([#&#8203;4694](https://github.com/valkey-io/valkey/issues/4694))
- Fix a server crash when loading an ACL file containing a selector with an unmatched parenthesis by [@&#8203;magic-peach](https://github.com/magic-peach) ([#&#8203;4214](https://github.com/valkey-io/valkey/issues/4214))
- Fix a segfault on Alpine/musl when Lua is built as a module, caused by a symbol clash on an internal clock function by [@&#8203;mohammedgqudah](https://github.com/mohammedgqudah) ([#&#8203;4270](https://github.com/valkey-io/valkey/issues/4270))
- Fix lex range seeks, NaN score bound handling, and a memory leak in B+tree sorted sets, and resolve `ZRANGEBYLEX` LIMIT offsets in logarithmic time by [@&#8203;xiaocj](https://github.com/xiaocj) ([#&#8203;4644](https://github.com/valkey-io/valkey/issues/4644))
- Fix expired hash fields left untracked after listpack-to-hashtable conversion, which could crash the server on a later write and leave fields that are never reaped by [@&#8203;beyondwin](https://github.com/beyondwin) ([#&#8203;4894](https://github.com/valkey-io/valkey/issues/4894))
- Restore acceptance of hexadecimal float sorted set scores (such as `0x10`), keeping replication and AOF replay compatible with Valkey 9.0 by [@&#8203;quanyeyang](https://github.com/quanyeyang) ([#&#8203;4875](https://github.com/valkey-io/valkey/issues/4875))
- Sorted set range commands with a negative `LIMIT` offset now return an empty result instead of a spurious element on btree-encoded keys by [@&#8203;xiaocj](https://github.com/xiaocj) ([#&#8203;4637](https://github.com/valkey-io/valkey/issues/4637))
- Fix `HSETEX` and `HGETEX` failing to parse their arguments when the key is named `fields` by [@&#8203;sebxt](https://github.com/sebxt) ([#&#8203;4945](https://github.com/valkey-io/valkey/issues/4945))
- Fix a crash when active defrag's deferred keys outlive a keyspace replacement such as FLUSHDB/FLUSHALL ASYNC, SWAPDB, or a replica's pre-sync flush by [@&#8203;taham0](https://github.com/taham0) ([#&#8203;4968](https://github.com/valkey-io/valkey/issues/4968))
- Fix `LSET` on 64-bit builds silently modifying the wrong element for out-of-range indexes instead of returning an index out of range error by [@&#8203;charsyam](https://github.com/charsyam) ([#&#8203;4823](https://github.com/valkey-io/valkey/issues/4823))
- Fix a heap buffer overflow in cluster Pub/Sub message construction; oversized PUBLISH and SPUBLISH payloads are now rejected with an error in cluster mode by [@&#8203;roshkhatri](https://github.com/roshkhatri) ([#&#8203;5030](https://github.com/valkey-io/valkey/issues/5030))
- Lex range commands on btree-encoded sorted sets with mixed scores now match listpack results, preventing primary/replica divergence via ZREMRANGEBYLEX and ZRANGESTORE by [@&#8203;pirate329](https://github.com/pirate329) ([#&#8203;4954](https://github.com/valkey-io/valkey/issues/4954))
- Fix a memory leak when `GEOSEARCH` or `GEOSEARCHSTORE` is given repeated `BYPOLYGON` options by [@&#8203;charsyam](https://github.com/charsyam) ([#&#8203;4995](https://github.com/valkey-io/valkey/issues/4995))
- `DEBUG RELOAD` and `DEBUG LOADAOF` now return a LOADING error while the dataset is loading, avoiding a possible panic by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;4877](https://github.com/valkey-io/valkey/issues/4877))
- Fix a memory leak in `ValkeyModule_GetCommandKeysWithFlags` when introspecting commands with large key lists by [@&#8203;christopherlim98](https://github.com/christopherlim98) ([#&#8203;5046](https://github.com/valkey-io/valkey/issues/5046))
- `MEMORY USAGE` now counts hash fields that have expired but not yet been reaped, fixing under-reported sizes by [@&#8203;sushilpaneru1](https://github.com/sushilpaneru1) ([#&#8203;5092](https://github.com/valkey-io/valkey/issues/5092))
- Fix a crash in `ValkeyModule_Call` when script-mode validation fails and error replies were not requested by [@&#8203;dvkashapov](https://github.com/dvkashapov) ([#&#8203;5091](https://github.com/valkey-io/valkey/issues/5091))
- High-priority socket events are no longer drained when the event loop caller did not request file event processing by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;5098](https://github.com/valkey-io/valkey/issues/5098))
- Fix a crash when a replication role change command such as `REPLICAOF` or `CLUSTER REPLICATE` arrives over a replication link by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5187](https://github.com/valkey-io/valkey/issues/5187))
- `FUNCTION RESTORE` now applies the same library load timeout as `FUNCTION LOAD`, so a never-returning library can no longer block the server forever by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5181](https://github.com/valkey-io/valkey/issues/5181))
- Fix a buffer overflow in valkey-benchmark when `--num-functions` is large enough to overflow the generated script buffer by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5175](https://github.com/valkey-io/valkey/issues/5175))
- Fix a valkey-check-rdb crash with `--stats` on RDB files whose highest selected database contains no keys by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5177](https://github.com/valkey-io/valkey/issues/5177))
- Fix a crash on the importing primary when an atomic slot migration fails while its writes are paused by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5182](https://github.com/valkey-io/valkey/issues/5182))
- Fix `GEOSEARCH BYPOLYGON` missing matching members when the polygon's vertex centroid falls outside the valid latitude range by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5174](https://github.com/valkey-io/valkey/issues/5174))
- Fix a primary abort when `CLUSTER SETSLOT` runs inside MULTI or a script on a primary with online replicas by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5141](https://github.com/valkey-io/valkey/issues/5141))
- Fix a memory leak when deleting or replacing Lua functions with long names or descriptions by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5109](https://github.com/valkey-io/valkey/issues/5109))
- A refused oversized `XADD` no longer creates an empty stream key that replicas and the AOF never receive by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5178](https://github.com/valkey-io/valkey/issues/5178))
- Prevent a replica crash when the primary wrongly replies +CONTINUE to a full resync request; the replica now drops the link and retries by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5126](https://github.com/valkey-io/valkey/issues/5126))
- FUNCTION LOAD no longer aborts the server when a library calls `server.log()` at its top level, including when loading from RDB or AOF by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5114](https://github.com/valkey-io/valkey/issues/5114))
- RESET on a slot migration connection now returns an error instead of crashing the server with an assertion failure by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5140](https://github.com/valkey-io/valkey/issues/5140))
- DEBUG SLOTMIGRATION with missing arguments now returns an error instead of crashing the server by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5147](https://github.com/valkey-io/valkey/issues/5147))
- KEYS on a flushed database no longer leaks a rehashing pause that permanently stops rehashing and can eventually crash the server by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5166](https://github.com/valkey-io/valkey/issues/5166))
- Automatic RDB snapshots and AOF rewrites are no longer postponed while a forked SCRIPT DEBUG session is open by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5153](https://github.com/valkey-io/valkey/issues/5153))
- Fix an integer overflow in quicklist node merging that could crash the server on lists loaded with nodes over 4GiB via RESTORE or replication by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5163](https://github.com/valkey-io/valkey/issues/5163))
- Fix a stack buffer overflow when replying with hundreds of empty strings (e.g. MGET) while reply copy avoidance is active by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5151](https://github.com/valkey-io/valkey/issues/5151))
- CLUSTER SLOT-STATS ORDERBY no longer replies with uninitialized slot entries when a node's primary is itself a replica that claims slots by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5131](https://github.com/valkey-io/valkey/issues/5131))
- Fix a race with TLS and io-threads where an IO thread still writing to a client could modify the main thread's event loop by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5156](https://github.com/valkey-io/valkey/issues/5156))
- Fix a replica crash when a script exceeding busy-reply-threshold ends during CLIENT PAUSE WRITE with a pending replicated write by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5150](https://github.com/valkey-io/valkey/issues/5150))
- In cluster mode, one cross-slot command in a script no longer makes every later script and function call fail until restart by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5191](https://github.com/valkey-io/valkey/issues/5191))
- Fix a use-after-free crash when a forkless save is running while a swapdb-mode full sync swaps in the primary's keyspace on a replica by [@&#8203;nitaicaro](https://github.com/nitaicaro) ([#&#8203;5082](https://github.com/valkey-io/valkey/issues/5082))
- Fix a replica assertion crash when the primary writes a key still in use by a forkless (consistent) save by [@&#8203;harrylin98](https://github.com/harrylin98) ([#&#8203;5206](https://github.com/valkey-io/valkey/issues/5206))
- Fix a dangling pointer when a key is deleted during a forkless save, which could crash or silently corrupt the iteration by [@&#8203;JimB123](https://github.com/JimB123) ([#&#8203;4996](https://github.com/valkey-io/valkey/issues/4996))
- Clear the script debugger input buffer after a "max client buffer reached" error so later debugger commands in the same session do not keep failing by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5129](https://github.com/valkey-io/valkey/issues/5129))
- MODULE LOAD is now rejected during async replication loading and atomic slot migration to avoid unexpected module behavior by [@&#8203;KIvanow](https://github.com/KIvanow) ([#&#8203;3039](https://github.com/valkey-io/valkey/issues/3039))
- Reject CLUSTER ADDSLOTS/DELSLOTS/ADDSLOTSRANGE/DELSLOTSRANGE/FLUSHSLOTS on replicas, preventing an assertion failure on a later CLUSTER REPLICATE by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;4020](https://github.com/valkey-io/valkey/issues/4020))
- Fix a crash when processing a heartbeat from a cluster node whose role is locally unknown, such as after loading an incomplete nodes.conf by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;4091](https://github.com/valkey-io/valkey/issues/4091))
- Fix wrong results or debug-build assertions in cluster mode when the server inspects keys outside the executing command's slot, such as WATCHed keys checked during EXEC by [@&#8203;nitaicaro](https://github.com/nitaicaro) ([#&#8203;4380](https://github.com/valkey-io/valkey/issues/4380))
- Fix stream commands that mutate consumer-group or PEL state (`XGROUP`, `XSETID`, `XREADGROUP`, `XACK`, `XCLAIM`, `XAUTOCLAIM`) not triggering `WATCH` and client-side tracking invalidation by [@&#8203;Tarte12](https://github.com/Tarte12) ([#&#8203;3459](https://github.com/valkey-io/valkey/issues/3459))
- Fix a server crash on FUNCTION DELETE or FUNCTION LOAD REPLACE after loading a library with function names differing only in case by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;3925](https://github.com/valkey-io/valkey/issues/3925))
- Client-side tracking no longer records routing-only tokens such as the CLUSTERSCAN cursor as tracked keys by [@&#8203;nmvk](https://github.com/nmvk) ([#&#8203;3699](https://github.com/valkey-io/valkey/issues/3699))
- Reject malformed slot entries in the cluster config file as a corrupt config instead of asserting or invoking undefined behavior by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;4100](https://github.com/valkey-io/valkey/issues/4100))
- Fix a TLS busy loop that consumed 100% CPU when a connection's read or write handler was removed while OpenSSL was waiting for the opposite event by [@&#8203;yairgott](https://github.com/yairgott) ([#&#8203;3510](https://github.com/valkey-io/valkey/issues/3510))
- Client eviction no longer disconnects extra clients when a large client's close is deferred but its memory is already scheduled to be freed by [@&#8203;dhruv2x](https://github.com/dhruv2x) ([#&#8203;4152](https://github.com/valkey-io/valkey/issues/4152))
- Fix a crash caused by a NULL pointer dereference when all timer events in an event loop are pending deletion by [@&#8203;royenheart](https://github.com/royenheart) ([#&#8203;4351](https://github.com/valkey-io/valkey/issues/4351))
- Rework iteration over clients blocked on ready keys to simplify and harden an earlier use-after-free fix by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;4472](https://github.com/valkey-io/valkey/issues/4472))
- Fix a race in RDB string compression that could produce corrupt, unloadable RDB files when compression runs concurrently, without increasing copy-on-write by [@&#8203;dubey02](https://github.com/dubey02) ([#&#8203;4539](https://github.com/valkey-io/valkey/issues/4539))
- Fix dropped field TTLs and a possible crash when loading a hash with field expiration converts it to a hashtable mid-load (e.g. via RESTORE) by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;4669](https://github.com/valkey-io/valkey/issues/4669))
- Reject a repeated `CLUSTER SYNCSLOTS ESTABLISH` on the same connection, which could lead to a use-after-free crash on disconnect by [@&#8203;Pyolar](https://github.com/Pyolar) ([#&#8203;4670](https://github.com/valkey-io/valkey/issues/4670))
- Fix wrong `ZCOUNT` results and incorrect `ZREMRANGEBYSCORE` deletions when members sharing a boundary score span multiple btree leaves by [@&#8203;rainsupreme](https://github.com/rainsupreme) ([#&#8203;4554](https://github.com/valkey-io/valkey/issues/4554))
- Fix `SORT` key extraction so a `STORE` destination named like an option can no longer bypass ACL checks and write to an unauthorized key by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;4665](https://github.com/valkey-io/valkey/issues/4665))

##### Command and API Updates

- Correct the `since` version of the `SISMEMBER` `XX` option to 9.2.0 in the command metadata by [@&#8203;PoisonGodv](https://github.com/PoisonGodv) ([#&#8203;5310](https://github.com/valkey-io/valkey/issues/5310))
- Allow null in the reply schemas of `GEOHASH`, `OBJECT FREQ`, `OBJECT IDLETIME` and `OBJECT REFCOUNT` for missing members and keys by [@&#8203;sarthakaggarwal97](https://github.com/sarthakaggarwal97) ([#&#8203;5209](https://github.com/valkey-io/valkey/issues/5209))
- Correct the `SENTINEL GET-MASTER-ADDR-BY-NAME` reply schema to allow the null reply returned for an unknown primary name by [@&#8203;rainsupreme](https://github.com/rainsupreme) ([#&#8203;5246](https://github.com/valkey-io/valkey/issues/5246))
- Correct command metadata to describe the `ZINCRBY` increment and `ZINTER`/`ZINTERSTORE`/`ZUNION`/`ZUNIONSTORE` weights as doubles instead of integers by [@&#8203;sarthakaggarwal97](https://github.com/sarthakaggarwal97) ([#&#8203;5210](https://github.com/valkey-io/valkey/issues/5210))
- Correct command metadata so the `numfields` count argument of hash field commands is no longer associated with a key specification by [@&#8203;sarthakaggarwal97](https://github.com/sarthakaggarwal97) ([#&#8203;5211](https://github.com/valkey-io/valkey/issues/5211))
- Correct expiry command metadata to show that `XX` can be combined with `GT` or `LT`, rather than all four conditions being mutually exclusive by [@&#8203;sarthakaggarwal97](https://github.com/sarthakaggarwal97) ([#&#8203;5213](https://github.com/valkey-io/valkey/issues/5213))
- Mark the `RESTORE` and `RESTORE-ASKING` `IDLETIME` and `FREQ` options as mutually exclusive in command metadata by [@&#8203;sarthakaggarwal97](https://github.com/sarthakaggarwal97) ([#&#8203;5212](https://github.com/valkey-io/valkey/issues/5212))
- Correct the `HEXPIRE`, `HPEXPIRE`, `HEXPIREAT`, and `HPEXPIREAT` command summaries to say they set expiration on hash fields, not the hash object by [@&#8203;poiuj](https://github.com/poiuj) ([#&#8203;4783](https://github.com/valkey-io/valkey/issues/4783))
- Add `LBOUND`, `UBOUND`, `SATURATE`, `ENX`, and `PERSIST` options to `INCREX` for bounded increments and conditional expiration control by [@&#8203;murphyjacob4](https://github.com/murphyjacob4) ([#&#8203;4679](https://github.com/valkey-io/valkey/issues/4679))
- Correct `SENTINEL SIMULATE-FAILURE` metadata so `COMMAND DOCS` shows the required mode argument and its tokens by [@&#8203;sarthakaggarwal97](https://github.com/sarthakaggarwal97) ([#&#8203;5208](https://github.com/valkey-io/valkey/issues/5208))
- Rename the Path Hash command `PHEXISTS` to `PHPATHEXISTS` to clarify that it checks a path rather than a hash field by [@&#8203;yangbodong22011](https://github.com/yangbodong22011) ([#&#8203;5069](https://github.com/valkey-io/valkey/issues/5069))
- Add `PHPATHSCAN` for ordered incremental path iteration and change `PHSCAN` to iterate fields and values at an exact path by [@&#8203;yangbodong22011](https://github.com/yangbodong22011) ([#&#8203;5066](https://github.com/valkey-io/valkey/issues/5066))
- Remove `PHLONGEST` in favor of `PHPREFIXES`, which now returns matches longest-first with paging and an `EXCLUDESELF` option by [@&#8203;yangbodong22011](https://github.com/yangbodong22011) ([#&#8203;5070](https://github.com/valkey-io/valkey/issues/5070))
- Replace `PHCARD` with `PHPATHCOUNT`, which can also count only the paths under a given prefix by [@&#8203;yangbodong22011](https://github.com/yangbodong22011) ([#&#8203;5071](https://github.com/valkey-io/valkey/issues/5071))
- Replace `PHDELPREFIX` with `PHPATHDEL key path [WITHSUBPATHS]`, which deletes an exact path or its whole subtree and returns the number of deleted paths by [@&#8203;yangbodong22011](https://github.com/yangbodong22011) ([#&#8203;5067](https://github.com/valkey-io/valkey/issues/5067))
- Mark the absolute timestamp arguments of `HEXPIREAT` and `HPEXPIREAT` as `unix-time` in `COMMAND DOCS`, matching `EXPIREAT` and `PEXPIREAT` by [@&#8203;rainsupreme](https://github.com/rainsupreme) ([#&#8203;5245](https://github.com/valkey-io/valkey/issues/5245))
- Correct `ZADD` and `LCS` metadata so `COMMAND DOCS` and valkey-cli hints no longer present `NX` with `GT`/`LT` or `LEN` with `IDX` as valid combinations by [@&#8203;rainsupreme](https://github.com/rainsupreme) ([#&#8203;5244](https://github.com/valkey-io/valkey/issues/5244))
- `MOVE` accepts a new optional `REPLACE` argument to overwrite an existing key in the destination database by [@&#8203;bandalgomsu](https://github.com/bandalgomsu) ([#&#8203;2993](https://github.com/valkey-io/valkey/issues/2993))
- WAIT and WAITAOF now reject numreplicas values that are negative or exceed INT_MAX, fixing an integer overflow that broke blocking by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;3407](https://github.com/valkey-io/valkey/issues/3407))
- Add CONFIG INFO subcommand returning config metadata such as type, flags, valid enum values and numeric ranges by [@&#8203;nitaicaro](https://github.com/nitaicaro) ([#&#8203;3050](https://github.com/valkey-io/valkey/issues/3050))
- Add the `IFNE` option to `SET` to set a key only when its current value differs from the given comparison value by [@&#8203;arshidkv12](https://github.com/arshidkv12) ([#&#8203;3105](https://github.com/valkey-io/valkey/issues/3105))
- Add `IFEQ`, `IFNE`, `NX` and `XX` conditions to `EXEC`, enabling optimistic locking for multi-key transactions without `WATCH` by [@&#8203;bandalgomsu](https://github.com/bandalgomsu) ([#&#8203;4019](https://github.com/valkey-io/valkey/issues/4019))
- Add an optional `XX` flag to `SISMEMBER` that returns -1 when the key does not exist, distinguishing a missing key from a missing member by [@&#8203;li-benson](https://github.com/li-benson) ([#&#8203;2972](https://github.com/valkey-io/valkey/issues/2972))
- Handle NOT_KEY key-specs more defensively so COMMAND GETKEYS and ACL key checks consistently treat routing-only tokens as non-keys by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;3675](https://github.com/valkey-io/valkey/issues/3675))
- Fix DEBUG HELP to show the correct DELAY-RDB-CLIENT-FREE-SECONDS name and document the SET-DISABLE-DENY-SCRIPTS subcommand by [@&#8203;xiejing-dev](https://github.com/xiejing-dev) ([#&#8203;4099](https://github.com/valkey-io/valkey/issues/4099))
- Add XX option to the ZRANGE family of commands to distinguish a non-existent key (nil) from an empty result by [@&#8203;youngmore1024](https://github.com/youngmore1024) ([#&#8203;2978](https://github.com/valkey-io/valkey/issues/2978))
- Fix the reply schemas of the ZRANGE family of commands to allow the null reply returned with the XX option by [@&#8203;murphyjacob4](https://github.com/murphyjacob4) ([#&#8203;4275](https://github.com/valkey-io/valkey/issues/4275))
- Fix the `XPENDING` reply schema to describe the summary reply returned when a consumer group has no pending messages by [@&#8203;sarthakaggarwal97](https://github.com/sarthakaggarwal97) ([#&#8203;4653](https://github.com/valkey-io/valkey/issues/4653))

##### Cluster and Replication

- Fix `HSETEX` and `MSETEX` with a repeated EX, PX or EXAT option being rejected by replicas and lost on AOF reload by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5088](https://github.com/valkey-io/valkey/issues/5088))
- Reject inbound cluster bus packets larger than 16MB, except Pub/Sub and module messages, so a peer cannot make a node buffer up to 4GB from a single header by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5065](https://github.com/valkey-io/valkey/issues/5065))
- Fix replicas retrying full sync in a loop when the primary rejects `PSYNC` and the replica falls back to `SYNC` by [@&#8203;murphyjacob4](https://github.com/murphyjacob4) ([#&#8203;5280](https://github.com/valkey-io/valkey/issues/5280))
- Strip every repeated `LIMIT` when propagating `XADD` and `XTRIM`, so tools replaying the replication stream no longer get a syntax error by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;4893](https://github.com/valkey-io/valkey/issues/4893))
- Fix shutdown-triggered failover promoting a replica that has `cluster-replica-no-failover yes` by [@&#8203;simonasr](https://github.com/simonasr) ([#&#8203;5033](https://github.com/valkey-io/valkey/issues/5033))
- Fix replication throttling starting earlier than intended when the replica output buffer limit is set below `repl-backlog-size` by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;5338](https://github.com/valkey-io/valkey/issues/5338))
- Fix Sentinel counting stale primary-down reports from peers toward quorum, which could trigger an unwanted failover of a healthy primary by [@&#8203;akasakariko](https://github.com/akasakariko) ([#&#8203;4913](https://github.com/valkey-io/valkey/issues/4913))
- Sentinel refuses to start when its config directory is not writable, instead of silently failing to save state by [@&#8203;sgissi](https://github.com/sgissi) ([#&#8203;5376](https://github.com/valkey-io/valkey/issues/5376))
- Fix replicas reporting duplicate import-aborted module events for one slot import when `FLUSHALL` on the primary fails an atomic slot migration by [@&#8203;sarthakaggarwal97](https://github.com/sarthakaggarwal97) ([#&#8203;5367](https://github.com/valkey-io/valkey/issues/5367))
- Fix `MSETEX` in cluster mode skipping `MOVED` and `CROSSSLOT` checks and its writes not being forwarded during atomic slot migration by [@&#8203;bhuvanprakash](https://github.com/bhuvanprakash) ([#&#8203;4951](https://github.com/valkey-io/valkey/issues/4951))
- Fix replication of `HDEL` commands generated by active hash field expiration during a forkless full sync by [@&#8203;JimB123](https://github.com/JimB123) ([#&#8203;5460](https://github.com/valkey-io/valkey/issues/5460))
- Decouple `rdbcompression` (on-disk RDB format) from `repl-compression` (replication wire format) so setting one no longer affects the other during a full sync by [@&#8203;zuiderkwast](https://github.com/zuiderkwast) ([#&#8203;4749](https://github.com/valkey-io/valkey/issues/4749))
- Avoid rapid failover election restarts by fast-failing only on NACK reasons that a new election epoch can actually fix by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;4700](https://github.com/valkey-io/valkey/issues/4700))
- Prevent a failover auth NACK for an old election from being counted against the current election by echoing the rejected request epoch by [@&#8203;xdk-amz](https://github.com/xdk-amz) ([#&#8203;4654](https://github.com/valkey-io/valkey/issues/4654))
- Keep a replica's connection to its primary on the main thread so replication flow control works when I/O threads are enabled by [@&#8203;chky1386](https://github.com/chky1386) ([#&#8203;4765](https://github.com/valkey-io/valkey/issues/4765))
- `HDEL`, `HGETDEL`, `HPERSIST`, and `HEXPIRE` no longer propagate fields they treat as expired, preventing replica and AOF-reload divergence by [@&#8203;xdk-amz](https://github.com/xdk-amz) ([#&#8203;4772](https://github.com/valkey-io/valkey/issues/4772))
- `COPY` of a hash now includes expired-but-unreaped fields so their deletion is propagated and replicas stay in sync by [@&#8203;pirate329](https://github.com/pirate329) ([#&#8203;4939](https://github.com/valkey-io/valkey/issues/4939))
- Fix atomic slot migration not replicating evictions on the import target, which let replicas grow far past `maxmemory` by [@&#8203;shanezx-sc](https://github.com/shanezx-sc) ([#&#8203;4920](https://github.com/valkey-io/valkey/issues/4920))
- Fix cluster config saving to avoid publishing truncated `nodes.conf` files, losing the startup lock after the first save, and failing every save on SMB filesystems such as Azure Files; the lock now lives on a separate `nodes.conf.lock` file by [@&#8203;KewangZhili](https://github.com/KewangZhili) ([#&#8203;4489](https://github.com/valkey-io/valkey/issues/4489))
- Fix failover election fast-fail double-counting a voter that rejected the request and was later marked FAIL, which could abandon a winnable election by [@&#8203;xdk-amz](https://github.com/xdk-amz) ([#&#8203;4655](https://github.com/valkey-io/valkey/issues/4655))
- Fix atomic slot migration with `cluster-databases` > 1 applying writes made during the snapshot to the wrong database on the target by [@&#8203;pirate329](https://github.com/pirate329) ([#&#8203;4952](https://github.com/valkey-io/valkey/issues/4952))
- Ignore new nodes gossiped by a sender still in handshake so a forged MEET packet cannot fill the cluster node table by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5145](https://github.com/valkey-io/valkey/issues/5145))
- Ignore invalid ping extension values from cluster peers that would corrupt nodes.conf and prevent the node from restarting by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5137](https://github.com/valkey-io/valkey/issues/5137))
- Bound the bytes the cluster bus reads per event so a peer with a constant read backlog cannot starve clients, cron and heartbeats by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5161](https://github.com/valkey-io/valkey/issues/5161))
- Fix incorrect missing-key handling of replicated MULTI/EXEC transactions during a forkless full sync by [@&#8203;JimB123](https://github.com/JimB123) ([#&#8203;5205](https://github.com/valkey-io/valkey/issues/5205))
- Cluster replicas now redirect keyless commands like SCAN and FLUSHDB to the primary for clients with CAPA REDIRECT that have not sent READONLY by [@&#8203;yanamolo](https://github.com/yanamolo) ([#&#8203;3505](https://github.com/valkey-io/valkey/issues/3505))
- Changing cluster-require-full-coverage via CONFIG SET now updates the cluster state immediately instead of waiting for the next cron cycle by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;3676](https://github.com/valkey-io/valkey/issues/3676))
- Fix CLUSTER BUMPEPOCH getting stuck when a dead node holds an equal or abnormally high config epoch; a single bump now overtakes it by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;4092](https://github.com/valkey-io/valkey/issues/4092))
- Replicas now retry PSYNC when the primary replies -BUSY instead of downgrading to legacy SYNC, which broke WAIT, PSYNC and FAILOVER by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;4140](https://github.com/valkey-io/valkey/issues/4140))
- SYNC/PSYNC from a replica with a down primary link now consistently returns -NOMASTERLINK, avoiding an unnecessary full sync fallback by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;4148](https://github.com/valkey-io/valkey/issues/4148))
- Add cluster-replica-priority config so operators can rank which replicas are preferred during automatic cluster failover by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;2204](https://github.com/valkey-io/valkey/issues/2204))
- Speed up recovery from split-vote failover elections with a new FAILOVER_AUTH_NACK message that lets a replica detect an unwinnable election and immediately retry with a higher epoch by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;3833](https://github.com/valkey-io/valkey/issues/3833))
- Add optional per-target `AUTH username password` to `CLUSTER MIGRATESLOTS`, with credentials redacted from the slow log and MONITOR by [@&#8203;nemtsv](https://github.com/nemtsv) ([#&#8203;3538](https://github.com/valkey-io/valkey/issues/3538))
- Compress the full-sync RDB payload with LZ4 when `rdbcompression lz4` is set and every attaching replica advertises support, reducing sync bandwidth with safe fallback to plaintext by [@&#8203;roshkhatri](https://github.com/roshkhatri) ([#&#8203;4075](https://github.com/valkey-io/valkey/issues/4075))
- Add an `if-empty` value to `cluster-replica-no-failover` so a replica that has never received data from its primary refuses automatic failover, preventing silent data loss by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;4425](https://github.com/valkey-io/valkey/issues/4425))
- Add optional LZ4 streaming compression for steady-state replication via the new `repl-compression` config, negotiated per replica so older or opted-out replicas keep receiving plaintext by [@&#8203;roshkhatri](https://github.com/roshkhatri) ([#&#8203;3853](https://github.com/valkey-io/valkey/issues/3853))
- Fix `CLUSTERSCAN` fingerprints to derive from the hash-seed config so cursors survive failover between nodes sharing a seed by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;3679](https://github.com/valkey-io/valkey/issues/3679))
- Replicas trigger a failover check immediately when cluster-replica-no-failover is disabled at runtime, instead of waiting for the next cron tick by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;3827](https://github.com/valkey-io/valkey/issues/3827))
- Validate node IDs and shard IDs received in cluster messages before applying them, dropping the link on invalid data to protect cluster state by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;4065](https://github.com/valkey-io/valkey/issues/4065))
- Drop the cluster link when a gossip section contains invalid node IDs, instead of keeping the connection to a corrupted sender alive by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;4077](https://github.com/valkey-io/valkey/issues/4077))
- Persist nodes.conf promptly when a node's address is updated through the gossip section by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;4089](https://github.com/valkey-io/valkey/issues/4089))
- Reject malformed node IDs in the open-slots RDB aux field instead of creating an illegal cluster node by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;4098](https://github.com/valkey-io/valkey/issues/4098))
- Strip the redundant LIMIT option when rewriting XADD/XTRIM for propagation, so the rewritten command is valid for tools that replay it by [@&#8203;cjx-zar](https://github.com/cjx-zar) ([#&#8203;4063](https://github.com/valkey-io/valkey/issues/4063))
- Persist non-default cluster-replica-priority to nodes.conf so it survives restarts instead of waiting for the next gossip round by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;4454](https://github.com/valkey-io/valkey/issues/4454))
- Clear a stale primary-failure gossip flag on replicas so later failovers don't incorrectly skip the election delay by [@&#8203;charsyam](https://github.com/charsyam) ([#&#8203;4533](https://github.com/valkey-io/valkey/issues/4533))
- Fix a node staying stuck in PFAIL when its PING is lost while the peer's own traffic keeps the cluster link alive by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;4171](https://github.com/valkey-io/valkey/issues/4171))
- `CLUSTER SYNCSLOTS FINISH` now rejects clients outside the slot migration stream, preventing misuse of the import state machine by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;4330](https://github.com/valkey-io/valkey/issues/4330))

##### Configuration

- Fix `notify-keyspace-events` dropping the `n` (new key) flag from `CONFIG GET` and `CONFIG REWRITE` when `A` is also set by [@&#8203;pirate329](https://github.com/pirate329) ([#&#8203;5199](https://github.com/valkey-io/valkey/issues/5199))
- CONFIG REWRITE now quotes the replicaof host, so hosts with spaces or newlines no longer corrupt the config file by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5176](https://github.com/valkey-io/valkey/issues/5176))
- Rename the `bgsave-default-method` config to `forkless-policy` with values `require-fork` and `prefer-forkless` by [@&#8203;madolson](https://github.com/madolson) ([#&#8203;5261](https://github.com/valkey-io/valkey/issues/5261))
- `commandlog-request-larger-than` and `commandlog-reply-larger-than` now accept memory units such as 10mb by [@&#8203;enjoy-binbin](https://github.com/enjoy-binbin) ([#&#8203;2648](https://github.com/valkey-io/valkey/issues/2648))
- `cluster-announce-ip` now must be a valid IP address or hostname, rejecting values like `ip:port` that broke cluster bus addressing by [@&#8203;AlisinaDevelo](https://github.com/AlisinaDevelo) ([#&#8203;4055](https://github.com/valkey-io/valkey/issues/4055))
- Reject an empty `tls-ca-cert-dir` at startup and `CONFIG SET` time instead of silently accepting it and failing every client handshake later by [@&#82…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-notes This issue should get a line item in the release notes

Projects

Status: Done
Status: Done
Status: Done
Status: Done
Status: Done
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants