Skip to content

Conversation

@oranagra
Copy link
Member

@oranagra oranagra commented Nov 11, 2025

These commands behave as DEL and SET (blindly Remove or Overwrite) when they don't get IF* flags, and require the value of the key when they do run with these flags.

Making sure they have the VARIABLE_FLAGS flag, and getKeysProc that can provide the right flags depending on the arguments used. (the plain flags when arguments are unknown are the common denominator ones)

Move lookupKey call in DELEX to avoid double lookup, which also means (some, namely arity) syntax errors are checked (and reported) before checking the existence of the key.

These commands behave as DEL and SET (Remove and Overwrite) when they
don't get IF* flags, and require the data when they do run with these
flags.

Move lookupKey call in DELEX to avoid double lookup
@jit-ci
Copy link

jit-ci bot commented Nov 11, 2025

Hi, I’m Jit, a friendly security platform designed to help developers build secure applications from day zero with an MVS (Minimal viable security) mindset.

In case there are security findings, they will be communicated to you as a comment inside the PR.

Hope you’ll enjoy using Jit.

Questions? Comments? Want to learn more? Get in touch with us.

@oranagra
Copy link
Member Author

oranagra commented Nov 11, 2025

assert_equal 0 [r delex key1 IFEQ]

this seems wrong. why not syntax error?

[edit] it seems very explicit and on purpose, but it looks very wrong to me. i took the liberty to fix it, unless you'll instruct me to revert it.
@sundb please advise, and consider tagging this for release notes.

@sundb sundb added the release-notes indication that this issue needs to be mentioned in the release notes label Nov 12, 2025
Copy link
Collaborator

@sundb sundb left a comment

Choose a reason for hiding this comment

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

LGTM

@oranagra
Copy link
Member Author

i can't find any discussion in #14435 on the order of lookup vs arity check and which error should be returned in that case. but still the test was very explicit.
i'll wait for @minchopaskal to comment before merging.

@sundb
Copy link
Collaborator

sundb commented Nov 12, 2025

@oranagra yes, it wasn't discussed and was overlooked.

@minchopaskal
Copy link
Collaborator


assert_equal 0 [r delex key1 IFEQ]

this seems wrong. why not syntax error?

[edit] it seems very explicit and on purpose, but it looks very wrong to me. i took the liberty to fix it, unless you'll instruct me to revert it.

@sundb please advise, and consider tagging this for release notes.

There was no specific requirement about this but certainly seems more logical to return arity error.

@sundb
Copy link
Collaborator

sundb commented Nov 12, 2025

@minchopaskal Theoretically, syntax errors are the top priority, and a syntax wrong command should not sometimes return 0 but sometimes return a syntax error, which can cause confusion.

Copy link
Collaborator

@minchopaskal minchopaskal left a comment

Choose a reason for hiding this comment

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

LGTM

@sundb
Copy link
Collaborator

sundb commented Nov 12, 2025

@oranagra #14435 hasn't been released yet. Do we need to mention it in the release note?

@oranagra
Copy link
Member Author

no, in that case we're good

@oranagra oranagra merged commit 0a6eacf into redis:unstable Nov 12, 2025
23 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Redis 8.4 Nov 12, 2025
@oranagra oranagra deleted the fix_new_cmd_flags branch November 12, 2025 09:36
@sundb sundb mentioned this pull request Nov 18, 2025
sundb added a commit that referenced this pull request Nov 18, 2025
This is the General Availability release of Redis 8.4 in Redis Open
Source.

### Major changes compared to 8.2

- `DIGEST`, `DELEX`; `SET` extensions - atomic compare-and-set and
compare-and-delete for string keys
- `MSETEX` - atomically set multiple string keys and update their
expiration
- `XREADGROUP` - new `CLAIM` option for reading both idle pending and
incoming stream entries
- `CLUSTER MIGRATION` - atomic slot migration
- `CLUSTER SLOT-STATS` - per-slot usage metrics: key count, CPU time,
and network I/O
- Redis query engine: `FT.HYBRID` - hybrid search and fused scoring
- Redis query engine: I/O threading with performance boost for search
and query commands (FT.*)
- I/O threading: substantial throughput increase (e.g. >30% for caching
use cases (10% `SET`, 90% `GET`), 4 cores)
- JSON: substantial memory reduction for homogenous arrays (up to 91%)

### Binary distributions

- Alpine and Debian Docker images - https://hub.docker.com/_/redis
- Install using snap - see https://github.com/redis/redis-snap
- Install using brew - see https://github.com/redis/homebrew-redis
- Install using RPM - see https://github.com/redis/redis-rpm
- Install using Debian APT - see https://github.com/redis/redis-debian


### Operating systems we test Redis 8.4 on

- Ubuntu 22.04 (Jammy Jellyfish), 24.04 (Noble Numbat)
- Rocky Linux 8.10, 9.5
- AlmaLinux 8.10, 9.5
- Debian 12 (Bookworm), Debian 13 (Trixie)
- macOS 13 (Ventura), 14 (Sonoma), 15 (Sequoia)

### Bug fixes (compared to 8.4-RC1)

- #14524 `XREADGROUP CLAIM` returns strings instead of integers
- #14529 Add variable key-spec flags to SET IF* and DELEX
- #P928 Potential memory leak (MOD-11484)
- #T1801, #T1805 macOS build failures (MOD-12293)
- #J1438 `JSON.NUMINCRBY` - wrong result on integer array with
non-integer increment (MOD-12282)
- #J1437 Thread safety issue related to ASM and shared strings
(MOD-12013)


### Performance and resource utilization improvements (compared to
8.4-RC1)

- #14480, #14516 Optimize `XREADGROUP`

### known bugs and limitations

- When executing `FT.SEARCH`, `FT.AGGREGATE`, `FT.CURSOR`, `FT.HYBRID`,
`TS.MGET`, `TS.MRANGE`, `TS.MREVRANGE` and `TS.QUERYINDEX` while an
atomic slot migration process is in progress, the results may be partial
or contain duplicates
- `FT.PROFILE`, `FT.EXPLAIN` and `FT.EXPLACINCLI` doesn’t contain the
`FT.HYBRID` option
- Metrics from `FT.HYBRID` command aren’t displayed on `FT.INFO` and
`INFO`
- Option `EXPLAINSCORE`, `SHARD_K_RATIO`, `YIELD_DISTANCE_AS` and
`WITHCURSOR` with `FT.HYBRID` are not available
- Post-filtering (after `COMBINE` step) using FILTER is not available
- Currently the default response format considers only `key_id` and
`score`, this may change for delivering entire document content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-notes indication that this issue needs to be mentioned in the release notes

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants