feat(stream): support exclusive range for XPENDING command#3282
Open
i18nsite wants to merge 5 commits intoapache:unstablefrom
Open
feat(stream): support exclusive range for XPENDING command#3282i18nsite wants to merge 5 commits intoapache:unstablefrom
i18nsite wants to merge 5 commits intoapache:unstablefrom
Conversation
PragmaTwice
reviewed
Dec 1, 2025
The XPENDING command was incorrectly using the start_id instead of the end_id when parsing the range arguments. This caused incorrect filtering of pending entries when a range was specified. This commit fixes the issue by passing the correct end_id to the ParseStreamEntryID function.
This commit adds support for exclusive ranges in the XPENDING command using the prefix for start and end IDs, similar to XRANGE. - Modified to include and flags. - Updated to handle prefix. - Updated to filter entries based on exclusion flags. - Added Go tests to verify exclusive range behavior.
5c862ef to
1e1aef1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
English / 中文
English
Issue: #3276
Description:
This PR adds support for exclusive ranges in the
XPENDINGcommand, allowing users to specify exclusive start and end IDs using the(prefix, similar toXRANGEandXREVRANGE.StreamPendingOptionsto includeexclude_startandexclude_endflags.CommandXPending::Parseto detect the(prefix instart_idandend_idarguments.Stream::GetPendingEntriesto correctly filter entries based on the exclusion flags.中文
Issue: #3276
描述:
本 PR 为
XPENDING命令添加了对排他范围的支持,允许用户使用(前缀指定排他的起始和结束 ID,类似于XRANGE和XREVRANGE。StreamPendingOptions,增加了exclude_start和exclude_end标志。CommandXPending::Parse,以检测start_id和end_id参数中的(前缀。Stream::GetPendingEntries,根据排他标志正确过滤条目。