Conversation
currantw
reviewed
Apr 14, 2026
6 tasks
affonsov
approved these changes
Apr 14, 2026
Collaborator
affonsov
left a comment
There was a problem hiding this comment.
I don't have any additional comment
Move BLMOVE, BLMPOP, BLPOP, BRPOP from IListBaseCommands to IBaseClient.ListCommands.cs since they are not supported by StackExchange.Redis (blocking operations block the multiplexer). Signed-off-by: Alex Rehnby-Martin <alex.rehnby-martin@improving.com>
Add RPOPLPUSH wrapper method for StackExchange.Redis compatibility. The method wraps ListMoveAsync with Right/Left sides. RPOPLPUSH is deprecated since Redis 6.2.0 but needed for SER compat. Includes integration tests for the new method. Signed-off-by: Alex Rehnby-Martin <alex.rehnby-martin@improving.com>
…Push Add overloads that accept CommandFlags without requiring When parameter. This fixes SER compatibility for code calling ListRightPushAsync(key, values, flags). Signed-off-by: Alex Rehnby-Martin <alex.rehnby-martin@improving.com>
…rface Blocking list commands (BLPOP, BRPOP, BLMOVE, BLMPOP) are not supported by StackExchange.Redis. Remove CommandFlags wrappers from IDatabaseAsync and Database. These methods remain available via IBaseClient for GLIDE users. Signed-off-by: Alex Rehnby-Martin <alex.rehnby-martin@improving.com>
Signed-off-by: Alex Rehnby-Martin <alex.rehnby-martin@improving.com>
…meter to SER-specific interface - Add ListLeftPushIfExistsAsync and ListRightPushIfExistsAsync to IBaseClient (GLIDE-style) - Move ListLeftPushAsync/ListRightPushAsync with When parameter from IListBaseCommands to IDatabaseAsync (SER-specific) - Keep simple ListLeftPushAsync/ListRightPushAsync (without When) in IListBaseCommands (shared) - Add implementations in Database.ListCommands.cs for SER-specific methods - Update XML documentation references across all affected files - Add integration tests for both SER-specific (When parameter) and GLIDE-specific (IfExists) methods - Update existing TestListPushX test to use GLIDE-style methods Signed-off-by: Alex Rehnby-Martin <alex.rehnby-martin@improving.com>
- Move ListGetByIndexAsync/ListSetByIndexAsync to IDatabaseAsync (SER-style) - Move ListIndexAsync/ListSetAsync to IBaseClient (GLIDE-style) - Add single-key convenience overloads for blocking list operations - Rename GLIDE tests to use ListIndex/ListSet naming - Add SER-compat tests for ListGetByIndexAsync/ListSetByIndexAsync - Update batch interfaces to use GLIDE-style naming Signed-off-by: Alex Rehnby-Martin <alex.rehnby-martin@improving.com>
Fix native memory leak in free_response, fix managed memory leak from undisposed PubSub subscriptions in ConnectionMultiplexer, and clean up dead/duplicate code in the FFI layer. This pull request is linked to issue: #298 * Fix critical native memory leak in free_response. Box::leak(Box::from_raw(ptr)).free_memory() reclaimed the heap-allocated ResponseValue via Box::from_raw, but immediately leaked it again with Box::leak. While free_memory() correctly freed nested contents (strings, arrays, maps), the top-level ResponseValue Box (~24 bytes) was never deallocated. This leaked on every single command response. Fixed by letting the Box drop naturally after free_memory() completes. free_memory(&self) only reads Copy-type fields (typ, val, size) to reconstruct and drop inner allocations, so it's safe to drop the Box after the call returns. * Fix managed memory leak in ConnectionMultiplexer.Dispose(). Dispose() was not calling RemoveAllSubscriptions(), leaving Subscription objects alive in the _subscriptions dictionary. Each Subscription holds delegate references (_handlers) and ChannelMessageQueue objects, which keep handler targets rooted. Added RemoveAllSubscriptions() before _db.Dispose() so subscriptions are cleaned up while the underlying client is still alive. The call is placed outside _lock since RemoveAllSubscriptions() has its own internal lock on _subscriptions. * Remove duplicate MarshalPubSubMessage from BaseClient and unused FreeDropScriptError method declaration. Signed-off-by: James Duong <duong.james@gmail.com> Signed-off-by: Alex Rehnby-Martin <alex.rehnby-martin@improving.com>
Signed-off-by: currantw <taylor.curran@improving.com> Signed-off-by: Alex Rehnby-Martin <alex.rehnby-martin@improving.com> Signed-off-by: Prateek Kumar <prateek.kumar@improving.com> Co-authored-by: Taylor Curran <taylor.curran@improving.com> Co-authored-by: prateek-kumar-improving <prateek.kumar@improving.com> Signed-off-by: Alex Rehnby-Martin <alex.rehnby-martin@improving.com>
…with ValkeyKey/ValkeyValue (#296) Signed-off-by: currantw <taylor.curran@improving.com> Signed-off-by: Alex Rehnby-Martin <alex.rehnby-martin@improving.com>
…id interface ambiguity Signed-off-by: Alex Rehnby-Martin <alex.rehnby-martin@improving.com>
8cfa48a to
193cc2a
Compare
Signed-off-by: Alex Rehnby-Martin <alex.rehnby-martin@improving.com>
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.
Summary
Refactors List commands to seperate out non-SER commands and ensure full SER interface compatiblity.
Issue Link
This pull request is linked to issue: 270
Features and Behaviour Changes
This PR improves StackExchange.Redis (SER) API compatibility for list commands:
Move blocking list commands to GLIDE-only interface -
BLMOVE,BLMPOP,BLPOP,BRPOPare not supported by SER (they would block the multiplexer). These methods have been moved fromIListBaseCommandstoIBaseClient.ListCommands.cs.Add
ListRightPopLeftPushAsync- SER-compatible wrapper for the deprecatedRPOPLPUSHcommand. Internally delegates toListMoveAsync(source, dest, ListSide.Right, ListSide.Left).Add
CommandFlags-only overloads for push methods - Added overloads forListLeftPushAsyncandListRightPushAsyncthat acceptCommandFlagswithout requiringWhenparameter. This fixes compilation errors for code likeListRightPushAsync(key, values, flags).Remove blocking command wrappers from SER-compat interface - Removed
ListBlockingLeftPopAsync,ListBlockingRightPopAsync,ListBlockingMoveAsync, andListBlockingPopAsyncwithCommandFlagsfromIDatabaseAsyncsince SER doesn't have these methods.Implementation
Key changes:
IBaseClient.ListCommands.cs(new) - Contains GLIDE-only blocking list commandsIListBaseCommands.cs- Shared interface for SER-compatible list commands onlyIDatabaseAsync.ListCommands.cs- SER-compat wrappers withCommandFlagsparameterDatabase.ListCommands.cs- Implementation of SER-compat wrappersThe blocking commands remain fully functional via
IBaseClientfor GLIDE users who need them. They are simply not exposed through the SER-compatibleIDatabaseAsyncinterface.Limitations
BLPOP,BRPOP,BLMOVE,BLMPOP) are not available through theIDatabaseAsyncinterface. Users who need blocking operations should use theIBaseClientinterface directly.RPOPLPUSHis deprecated since Redis 6.2.0. TheListRightPopLeftPushAsyncmethod is provided only for SER compatibility; new code should useListMoveAsync.Testing
ListRightPopLeftPushAsynccovering:CommandFlags-only overloads ofListLeftPushAsyncandListRightPushAsyncChecklist
CHANGELOG.md,README.md,DEVELOPER.md, and other documentation files are updated.mainor releasemain, squash otherwise.