Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix (stream): XRANGE incorrectly interprets the end parameter #4443

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

adiholden
Copy link
Collaborator

fix #4440

@adiholden adiholden requested a review from chakaz January 12, 2025 15:24
@@ -257,15 +257,16 @@ bool ParseID(string_view strid, bool strict, uint64_t missing_seq, ParsedStreamI
return true;
}

bool ParseRangeId(string_view id, RangeId* dest) {
enum class RangeBoundary { kStart, kEnd };
Copy link
Collaborator

Choose a reason for hiding this comment

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

🤓

Comment on lines +96 to +98
TEST_F(StreamFamilyTest, Xrange) {
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

did you mean to add some tests here?

@@ -111,6 +114,29 @@ TEST_F(StreamFamilyTest, Range) {
sub1 = sub_arr[1].GetVec();
EXPECT_THAT(sub0, ElementsAre("1-1", ArrLen(2)));
EXPECT_THAT(sub1, ElementsAre("1-0", ArrLen(2)));

Run({"xadd", "mystream", "1609459200000-0", "0", "0"});
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this be in a different TEST_F fixture?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

XRANGE incorrectly interprets the end parameter when only the timestamp portion is provided
2 participants