Repository navigation
Preserve binary members as VectorSetRange bounds - #3256
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The shared bound construction fixes the binary corruption issue and is covered by focused regression tests.
Review effort: Balanced
Findings: None
What changed in this PR
Fixes VRANGE bounds to preserve binary members by reusing raw-byte lexicographic bound construction.
Changes:
- Replaces string concatenation with
GetLexRange. - Adds binary-bound and pagination regression tests.
| File | Description |
|---|---|
src/StackExchange.Redis/RedisDatabase.VectorSets.cs |
Builds vector range bounds from raw bytes. |
tests/StackExchange.Redis.Tests/VectorSetIntegrationTests.cs |
Tests binary bounds and finite enumeration. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
Author
|
The Windows failure is |
mgravell
approved these changes
Oct 2, 2026
mgravell
added a commit
that referenced
this pull request
Oct 6, 2026
…ented) VectorSetBound concatenated "[" + value through a string, mangling members that are not valid UTF-8; it now delegates to SortedSets.LexBound, which builds the bound from the raw bytes. Upstream's two integration tests are ported unchanged, and fail without the fix. Absorbs: c137c64
mgravell
added a commit
that referenced
this pull request
Oct 6, 2026
Conflicts, and how each was re-expressed in v4 terms: - RedisDatabase.VectorSets.cs: modified on main, deleted on v4. Kept deleted; the fix lives in VectorSets.VectorSetBound (990dccd). - VectorSetIntegrationTests.cs: both sides added the same two tests. Took v4's.
FloatingMilkshake
pushed a commit
to FloatingMilkshake/MechanicalMilkshake
that referenced
this pull request
Oct 9, 2026
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [StackExchange.Redis](https://seredis.dev/) ([source](https://github.com/StackExchange/StackExchange.Redis)) | nuget | minor | `3.3.1` → `3.4.0` | --- ### Release Notes <details> <summary>StackExchange/StackExchange.Redis (StackExchange.Redis)</summary> ### [`v3.4.0`](https://github.com/StackExchange/StackExchange.Redis/releases/tag/3.4.0) [Compare Source](StackExchange/StackExchange.Redis@3.3.1...3.4.0) #### Major Changes - In RESP3, by default the library now uses **separate** connections for pub/sub; see [#​3264](StackExchange/StackExchange.Redis#3264) - Smart-client-handoffs is now enabled by default on Redis Enterprise and AMR; see [#​3248](StackExchange/StackExchange.Redis#3248) - Some logging events incorrectly used duplicated ids - resolved; see [#​3266](StackExchange/StackExchange.Redis#3266) #### All Changes - Recover promptly from a cluster failover; fix the configuration channel under RESP3 and with a channel prefix ([#​3254](StackExchange/StackExchange.Redis#3254)) by [@​mgravell](https://github.com/mgravell) in [#​3255](StackExchange/StackExchange.Redis#3255) - Preserve binary members as VectorSetRange bounds by [@​Laurianti](https://github.com/Laurianti) in [#​3256](StackExchange/StackExchange.Redis#3256) - Smart client handoffs: reinstate auto-enlistment for the hosted providers and remove \[Experimental] by [@​mgravell](https://github.com/mgravell) in [#​3248](StackExchange/StackExchange.Redis#3248) - docs: fix retry-category test in the custom RetryPolicy sample by [@​mgravell](https://github.com/mgravell) in [#​3265](StackExchange/StackExchange.Redis#3265) - Fix duplicate LoggerMessage event ids; add a guard test by [@​mgravell](https://github.com/mgravell) in [#​3266](StackExchange/StackExchange.Redis#3266) - Scan: observe the faults of abandoned page tasks after a sync timeout or dispose ([#​3260](StackExchange/StackExchange.Redis#3260)) by [@​mgravell](https://github.com/mgravell) in [#​3267](StackExchange/StackExchange.Redis#3267) - Report the outcome of every physical connection attempt, identifying the client certificate used by [@​mgravell](https://github.com/mgravell) in [#​3257](StackExchange/StackExchange.Redis#3257) - Use a dedicated pub/sub connection under RESP3 by default by [@​mgravell](https://github.com/mgravell) in [#​3264](StackExchange/StackExchange.Redis#3264) #### Tooling - docs(agents): add create-implementation-plan-for-redis-api-change skill by [@​uglide](https://github.com/uglide) in [#​3268](StackExchange/StackExchange.Redis#3268) #### New Contributors - [@​Laurianti](https://github.com/Laurianti) made their first contribution in [#​3256](StackExchange/StackExchange.Redis#3256) **Full Changelog**: <StackExchange/StackExchange.Redis@3.3.1...3.4.0> </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xNDkuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjE0OS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Reviewed-on: https://git.milkshake.services/FloatingMilkshake/MechanicalMilkshake/pulls/9 Reviewed-by: Milkshake <[email protected]>
FloatingMilkshake
pushed a commit
to FloatingMilkshake/Azusa
that referenced
this pull request
Oct 9, 2026
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [StackExchange.Redis](https://seredis.dev/) ([source](https://github.com/StackExchange/StackExchange.Redis)) | nuget | minor | `3.3.1` → `3.4.0` | --- ### Release Notes <details> <summary>StackExchange/StackExchange.Redis (StackExchange.Redis)</summary> ### [`v3.4.0`](https://github.com/StackExchange/StackExchange.Redis/releases/tag/3.4.0) [Compare Source](StackExchange/StackExchange.Redis@3.3.1...3.4.0) #### Major Changes - In RESP3, by default the library now uses **separate** connections for pub/sub; see [#​3264](StackExchange/StackExchange.Redis#3264) - Smart-client-handoffs is now enabled by default on Redis Enterprise and AMR; see [#​3248](StackExchange/StackExchange.Redis#3248) - Some logging events incorrectly used duplicated ids - resolved; see [#​3266](StackExchange/StackExchange.Redis#3266) #### All Changes - Recover promptly from a cluster failover; fix the configuration channel under RESP3 and with a channel prefix ([#​3254](StackExchange/StackExchange.Redis#3254)) by [@​mgravell](https://github.com/mgravell) in [#​3255](StackExchange/StackExchange.Redis#3255) - Preserve binary members as VectorSetRange bounds by [@​Laurianti](https://github.com/Laurianti) in [#​3256](StackExchange/StackExchange.Redis#3256) - Smart client handoffs: reinstate auto-enlistment for the hosted providers and remove \[Experimental] by [@​mgravell](https://github.com/mgravell) in [#​3248](StackExchange/StackExchange.Redis#3248) - docs: fix retry-category test in the custom RetryPolicy sample by [@​mgravell](https://github.com/mgravell) in [#​3265](StackExchange/StackExchange.Redis#3265) - Fix duplicate LoggerMessage event ids; add a guard test by [@​mgravell](https://github.com/mgravell) in [#​3266](StackExchange/StackExchange.Redis#3266) - Scan: observe the faults of abandoned page tasks after a sync timeout or dispose ([#​3260](StackExchange/StackExchange.Redis#3260)) by [@​mgravell](https://github.com/mgravell) in [#​3267](StackExchange/StackExchange.Redis#3267) - Report the outcome of every physical connection attempt, identifying the client certificate used by [@​mgravell](https://github.com/mgravell) in [#​3257](StackExchange/StackExchange.Redis#3257) - Use a dedicated pub/sub connection under RESP3 by default by [@​mgravell](https://github.com/mgravell) in [#​3264](StackExchange/StackExchange.Redis#3264) #### Tooling - docs(agents): add create-implementation-plan-for-redis-api-change skill by [@​uglide](https://github.com/uglide) in [#​3268](StackExchange/StackExchange.Redis#3268) #### New Contributors - [@​Laurianti](https://github.com/Laurianti) made their first contribution in [#​3256](StackExchange/StackExchange.Redis#3256) **Full Changelog**: <StackExchange/StackExchange.Redis@3.3.1...3.4.0> </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xNDkuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjE0OS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Reviewed-on: https://git.milkshake.services/FloatingMilkshake/Azusa/pulls/9 Reviewed-by: Milkshake <[email protected]>
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.
VectorSetRangeandVectorSetRangeEnumeratebuild the[/(bounds by string concatenation,("(" + value). For a member that is not valid UTF-8,RedisValue.ToString()returns its hex form, so the bound sent to the server is not the member.ZRANGEBYLEXalready builds its bounds from the raw bytes inGetLexRange; this change makesVRANGEuse the same helper.With members
a,band{ 0xFF, 0x01 }, against Redis 8:VectorSetRange(key, start: binary, exclude: Exclude.Start)returned the binary member itself instead of nothing.VectorSetRangeEnumerate(key, count: 1)never ended: aftera, b, 0xFF01it kept returning0xFF01, because each next batch started from the hex text, which sorts before the member.Added
VectorSetRange_BinaryMemberAsBoundandVectorSetRangeEnumerate_BinaryMemberstoVectorSetIntegrationTests. Against Redis 8,--filter VectorSetRangepasses 40 of 40 (RESP2 and RESP3); without the change only the two new tests fail, in both protocols. The library builds for all targets with no warnings.Checklist