GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [Redis 8.12] Support set member expiration (SME) commands by atakavci · Pull Request #4828 · redis/jedis

Conversation

@atakavci

@atakavci atakavci commented Nov 4, 2026 •
edited by cursor Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Summary

Adds the ten set member expiration commands introduced in Redis 8.12: SEXPIRE, SPEXPIRE, SEXPIREAT, SPEXPIREAT, STTL, SPTTL, SEXPIRETIME, SPEXPIRETIME, SPERSIST and SADDEX. Every command comes in a multi-member form and a single-member convenience form, on the String and binary APIs, in pipelines and transactions, and on the legacy Jedis client.

Key Decisions & Assumptions

  • The API mirrors the existing hash field expiration methods: per-member replies come back as List<Long>, and the *expire* commands take an optional ExpiryOption (NX/XX/GT/LT) overload instead of a dedicated params class.
  • Single-member overloads (sexpire(key, seconds, member), sttl(key, member), saddex(key, params, member), and so on) return a plain long instead of a one-element list. They send the same MEMBERS 1 <member> wire form and unwrap the reply with a new BuilderFactory.LONG_FROM_LIST builder, so callers with one member avoid the list boilerplate.
  • SADDEX gets a SAddExParams class that extends BaseSetExParams for ex/px/exAt/pxAt/keepTtl and adds mnx()/mxx(). Each group is a last-call-wins slot, and the command appends the MEMBERS <count> block itself.
  • No client-side version check: on servers older than 8.12 the commands fail with the server's unknown-command error.
  • New public API is annotated @since 8.1.

Behavioral / Conceptual Changes

  • Existing set methods are untouched, but their Javadoc now documents how Redis 8.12 propagates member expiration: sunionstore keeps the farthest, sinterstore the nearest, sdiffstore the first set's, and smove moves the member with its expiration.
  • Release notes for 8.1.0 gain a "Set member expiration commands" entry.

Testing

Unit tests cover argument encoding for every command, in both multi-member and single-member form, across CommandObjects, UnifiedJedis and PipeliningBase, plus SAddExParams ordering, equality and overriding behavior. Integration tests in the shared set test base, the Jedis set tests, and the pipeline tests exercise reply codes (-2/-1/0/1/2), per-member NX/XX/GT/LT semantics, past-time deletion, SADDEX conditions and the zero-modification reply, wrong-type errors, and the single-member variants returning the same codes as their list counterparts. They are gated with @EnabledOnCommand("SADDEX") so they skip on older servers.


Note

Medium Risk
Broad new command surface and wire-format details tied to Redis 8.12 behavior; mistakes in argument ordering or reply parsing could confuse callers or break SME-heavy workloads, though the change is additive and guarded by integration tests.

Overview
Adds full client support for Redis 8.12 set member expiration: the sexpire / spexpire / sexpireAt / spexpireAt family (with optional ExpiryOption per member), sttl, spttl, sexpireTime, spexpireTime, spersist, and saddex backed by new SAddExParams (mnx / mxx plus ex / px / exAt / pxAt / keepTtl).

Multi-member calls return List<Long>; single-member overloads return a plain long, using new BuilderFactory.LONG_FROM_LIST to unwrap one-element array replies while still emitting MEMBERS 1 … on the wire. String and binary paths, UnifiedJedis, legacy Jedis, pipelines, and the various Set* command interfaces are all extended, and Protocol registers the new commands plus MEMBERS, MNX, and MXX keywords.

Docs and semantics: 8.1.0 release notes describe the commands; Javadoc on sdiffstore, sinterstore, sunionstore, and smove calls out how member expirations propagate in Redis 8.12. Tests add command-object, unified, pipeline, mocked, and integration coverage (including conditions, past-time deletes, saddex edge cases, wrong-type handling, and single-member variants), gated with @EnabledOnCommand("SADDEX") so they skip on servers without SME.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
atakavci added 2 commits November 4, 2026 11:49
@atakavci
- support set member expiration (Redis 8.12)
b367806
@atakavci
- introduce single item variants for SME
afddc1e
@atakavci
atakavci requested review from a-TODO-rov and ggivo November 4, 2026 14:41
@atakavci atakavci self-assigned this Nov 4, 2026
@atakavci atakavci added the feature label Nov 4, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T10:06:00.077601Z 01c6beb New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Nov 4, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: afddc1ee6e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/main/java/redis/clients/jedis/params/SAddExParams.java

private Keyword condition;

public static SAddExParams sAddExParams() {

@chatgpt-codex-connector chatgpt-codex-connector Bot Nov 4, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

P2 Badge Add @SInCE to the new parameter methods

The factory is new public API, as are mnx() and mxx(), but only the class-level Javadoc carries @since; generated method-level API documentation therefore cannot identify when these entry points were added. Add @since 8.1 to each of these three public methods.

AGENTS.md reference: AGENTS.md:L27-L31

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ggivo ggivo changed the title Support set member expiration(SME) commands (Redis 8.12) [8.12] Support set member expiration(SME) commands (Redis 8.12) Nov 5, 2026
@ggivo ggivo added this to the 8.1.0 milestone Nov 5, 2026
This was referenced Nov 5, 2026
[Redis 8.12] Support the BLESS command family #4773
Merged
[Redis 8.12] Regenerate command flags registry from Redis 8.12-rc2 #4831
Merged
@atakavci
Merge branch 'master' into ali/setMemberExpire
ba5471e
chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Nov 5, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ba5471e6b4

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/main/java/redis/clients/jedis/BuilderFactory.java
* The single integer of a one-element integer array reply, for the single-member variants of
* commands that reply with one integer per member (e.g. {@code SEXPIRE key 10 MEMBERS 1 m}).
*/
public static final Builder<Long> LONG_FROM_LIST = new Builder<Long>() {

@chatgpt-codex-connector chatgpt-codex-connector Bot Nov 5, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

P2 Badge Add @SInCE to the new response builder

When the 8.1 API documentation is generated, the newly exposed public LONG_FROM_LIST builder has no @since 8.1 tag, so consumers cannot determine when this API became available; add the tag to this declaration.

AGENTS.md reference: AGENTS.md:L27-L31

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ggivo ggivo changed the title [8.12] Support set member expiration(SME) commands (Redis 8.12) [Redis 8.12] Support set member expiration (SME) commands Nov 6, 2026
ggivo
ggivo approved these changes Nov 6, 2026
View reviewed changes

@ggivo ggivo left a comment

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@atakavci
Merge branch 'master' into ali/setMemberExpire
01c6beb
@atakavci
atakavci merged commit e7c37d3 into redis:master Nov 6, 2026
15 checks passed

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Nov 10, 2026
DOC-7292 Add API mappings for the new Redis 8.12 commands redis/docs#4525
Merged
DOC-7293 Add a Jedis set member expiration example to the sets page redis/docs#4526
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments
@ggivo ggivo ggivo approved these changes
@a-TODO-rov a-TODO-rov Awaiting requested review from a-TODO-rov

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@atakavci atakavci

Labels

feature

Projects

None yet

Milestone

8.1.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@atakavci @ggivo
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.