Skip to content

Introduce INCREX command#4526

Merged
ggivo merged 11 commits into
masterfrom
increx
May 22, 2026
Merged

Introduce INCREX command#4526
ggivo merged 11 commits into
masterfrom
increx

Conversation

@a-TODO-rov

@a-TODO-rov a-TODO-rov commented May 14, 2026

Copy link
Copy Markdown
Contributor

Note

Medium Risk
Adds a new Redis command surface (INCREX) across Jedis/UnifiedJedis/pipelining plus new parameter builders; changes touch core protocol enums and command construction, so regressions would mainly be in command argument encoding and response parsing.

Overview
Adds client support for Redis INCREX, including new StringCommands/StringBinaryCommands/pipeline APIs and corresponding implementations in Jedis, UnifiedJedis, PipeliningBase, and CommandObjects (integer and float variants returning [newValue, appliedIncrement]).

Introduces IncrexParams/IncrexFloatParams (via BaseIncrexParams) to encode bounds, SATURATE, and expiration controls (including ENX), extends Protocol with the new command/keywords, and adds comprehensive integration + mocked tests; pom.xml formatter includes are updated to cover the new *Increx* files.

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

@github-actions

github-actions Bot commented May 14, 2026

Copy link
Copy Markdown

Test Results

  203 files  ±  0    203 suites  ±0   9m 45s ⏱️ -12s
7 767 tests +150  7 108 ✅  - 447  659 💤 +597  0 ❌ ±0 
7 787 runs  +150  7 128 ✅  - 447  659 💤 +597  0 ❌ ±0 

Results for commit 51a29ea. ± Comparison against base commit c06bc2c.

This pull request skips 447 tests.
redis.clients.jedis.commands.commandobjects.CommandObjectsArrayCommandsTest[1] ‑ testArcountMissingKey()[1]
redis.clients.jedis.commands.commandobjects.CommandObjectsArrayCommandsTest[1] ‑ testArcountMissingKeyBinary()[1]
redis.clients.jedis.commands.commandobjects.CommandObjectsArrayCommandsTest[1] ‑ testArdel()[1]
redis.clients.jedis.commands.commandobjects.CommandObjectsArrayCommandsTest[1] ‑ testArdelBinary()[1]
redis.clients.jedis.commands.commandobjects.CommandObjectsArrayCommandsTest[1] ‑ testArdelrange()[1]
redis.clients.jedis.commands.commandobjects.CommandObjectsArrayCommandsTest[1] ‑ testArdelrangeBinary()[1]
redis.clients.jedis.commands.commandobjects.CommandObjectsArrayCommandsTest[1] ‑ testArget()[1]
redis.clients.jedis.commands.commandobjects.CommandObjectsArrayCommandsTest[1] ‑ testArgetBinary()[1]
redis.clients.jedis.commands.commandobjects.CommandObjectsArrayCommandsTest[1] ‑ testArgetrange()[1]
redis.clients.jedis.commands.commandobjects.CommandObjectsArrayCommandsTest[1] ‑ testArgetrangeBinary()[1]
…

♻️ This comment has been updated with latest results.

@jit-ci

jit-ci Bot commented May 14, 2026

Copy link
Copy Markdown

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

@a-TODO-rov a-TODO-rov linked an issue May 15, 2026 that may be closed by this pull request
@a-TODO-rov a-TODO-rov marked this pull request as ready for review May 15, 2026 07:29
@a-TODO-rov a-TODO-rov requested a review from ggivo May 15, 2026 07:30

@ggivo ggivo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good,
Added some notes, let's add integration tests for binary variants also.

Comment thread src/main/java/redis/clients/jedis/commands/StringCommands.java Outdated
Comment thread src/main/java/redis/clients/jedis/BuilderFactory.java Outdated
Comment thread src/main/java/redis/clients/jedis/BuilderFactory.java Outdated
Comment thread src/main/java/redis/clients/jedis/commands/StringBinaryCommands.java Outdated
Comment thread src/main/java/redis/clients/jedis/params/IncrexParams.java Outdated
Comment thread src/main/java/redis/clients/jedis/params/IncrexParams.java Outdated
- Add binary ITs
- Remove experimental
- Move builders in response object. Reuse generic builders.
- Add javadoc.
Comment thread src/main/java/redis/clients/jedis/resps/IncrexResponse.java Outdated

@ggivo ggivo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

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

Reviewed by Cursor Bugbot for commit 51a29ea. Configure here.

@Mock protected CommandObject<Double> doubleCommandObject;
@Mock protected CommandObject<FunctionStats> functionStatsCommandObject;
@Mock protected CommandObject<List<Double>> increxDoubleListCommandObject;
@Mock protected CommandObject<List<Long>> increxLongListCommandObject;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Redundant mock fields duplicate existing typed mocks

Low Severity

increxDoubleListCommandObject and increxLongListCommandObject are CommandObject<List<Double>> and CommandObject<List<Long>> respectively — the exact same types as the already-existing listDoubleCommandObject (line 67) and listLongCommandObject (line 76). Every other mock in this shared base class follows a type-based naming convention (e.g., listStringCommandObject, longCommandObject). The existing mocks could be reused in the INCREX tests instead of introducing feature-prefixed duplicates.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 51a29ea. Configure here.

@ggivo ggivo merged commit 9a2dcd5 into master May 22, 2026
18 checks passed
@ggivo ggivo deleted the increx branch May 22, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support INCREX command (Redis 8.8)

2 participants