Skip to content

(feat) Add support for xautoclaim to return list of deleted messages ids from PEL#3798

Merged
ndyakov merged 13 commits intoredis:masterfrom
Khukharr:master
May 7, 2026
Merged

(feat) Add support for xautoclaim to return list of deleted messages ids from PEL#3798
ndyakov merged 13 commits intoredis:masterfrom
Khukharr:master

Conversation

@Khukharr
Copy link
Copy Markdown
Contributor

@Khukharr Khukharr commented Apr 28, 2026

Since Redis 7.0, XAUTOCLAIM now returns a list of deleted message IDs as the 3rd part of the reply. Previously that part was discarded when received. This adds the ability to read those deleted message IDs and return them.

See: https://redis.io/docs/latest/commands/xautoclaim/


Note

Medium Risk
Adds a new public stream command and command type to parse Redis 7+ XAUTOCLAIM replies, touching reply parsing and cluster aggregation paths; mistakes could cause incorrect stream consumption behavior or aggregation failures.

Overview
Adds Redis 7+ support for XAUTOCLAIM’s third reply element (deleted PEL entry IDs) by introducing XAutoClaimWithDeleted / XAutoClaimWithDeletedCmd, which parses and returns deletedIDs instead of discarding them.

Updates command-type plumbing (CmdTypeXAutoClaimWithDeleted, value extraction, and OSS cluster router command creation/value setting) and adds a regression test asserting deleted IDs are surfaced after an XDEL.

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

@jit-ci
Copy link
Copy Markdown

jit-ci Bot commented Apr 28, 2026

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.

@jit-ci
Copy link
Copy Markdown

jit-ci Bot commented Apr 28, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

Comment thread command.go
@ndyakov
Copy link
Copy Markdown
Member

ndyakov commented Apr 29, 2026

Thank you @Khukharr , we will look at this as soon as possible.

@Khukharr Khukharr changed the title XAutoClaim: reading and returning deleted message IDs (redis 7.0)+ (feat) Add support for xautoclaim to return list of deleted messages ids from PEL Apr 29, 2026
Comment thread command.go
Comment thread stream_commands.go Outdated
Comment thread stream_commands.go Outdated
Copy link
Copy Markdown

@cursor cursor Bot left a comment

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 6606533. Configure here.

Comment thread command.go
Benoit Verreault added 2 commits April 30, 2026 14:01
@Khukharr Khukharr requested a review from ndyakov May 1, 2026 11:50
@Khukharr
Copy link
Copy Markdown
Contributor Author

Khukharr commented May 1, 2026

I seem to be hitting what I could consider intermittent issues trying to get CI to run. I don't know if I should keep on triggering CI until it all passes or leave it as is ?

Benoit Verreault added 2 commits May 1, 2026 15:36
Copy link
Copy Markdown
Member

@ndyakov ndyakov left a comment

Choose a reason for hiding this comment

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

@Khukharr it is strange why the CI detects a data race with this pr changes. Let me restart it and investigate

@Khukharr
Copy link
Copy Markdown
Contributor Author

Khukharr commented May 7, 2026

@Khukharr it is strange why the CI detects a data race with this pr changes. Let me restart it and investigate

@ndyakov The only time I hit issues locally was a redis cluster failing to properly initialize in a docker container.

@ndyakov
Copy link
Copy Markdown
Member

ndyakov commented May 7, 2026

It looks like a data race while closing the pool, not related to this PR, will continue with a proper review of the changes and get back to you.

Copy link
Copy Markdown
Member

@ndyakov ndyakov left a comment

Choose a reason for hiding this comment

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

Looks good to me, thank you @Khukharr!

@ndyakov ndyakov added the feature label May 7, 2026
@ndyakov
Copy link
Copy Markdown
Member

ndyakov commented May 7, 2026

btw, this should fix the CI: #3805

@ndyakov ndyakov merged commit 5a3f74c into redis:master May 7, 2026
39 checks passed
retr0-kernel pushed a commit to retr0-kernel/go-redis that referenced this pull request May 7, 2026
…d messages ids from PEL (redis#3798)

* reading xautoclaim's 3rd return value as list of deletedIDs

* adding test for xautoclaim that returns deletedIDs

* updating expected comments. running doctests make test locally works fine ?

* Adding missing clone deletedIDs

* switch to creating a new command instead

* output needed updating

* forgot to add the XAutoClaimWithDelete command to StreamCmdable

* Fix naming inconsistency in XAutoClaimWithDeleted

* trigger CI

* trigger CI

* trigger CI

* trigger CI

---------

Co-authored-by: Benoit Verreault <benoit.verreault@gearbox.com>
Co-authored-by: Nedyalko Dyakov <1547186+ndyakov@users.noreply.github.com>
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.

2 participants