Replace deprecated RPOPLPUSH with LMOVE and add SE.Redis compatibility notes#164
Merged
Merged
Conversation
- Replace RPOPLPUSH with LMOVE (Redis 6.2+) in DequeueId.lua since RPOPLPUSH is deprecated and may be removed in a future Redis version - Add NOTE to RemoveIfEqual.lua and ReplaceIfEqual.lua about replacing with native CAS/CAD commands (SET IFEQ / DEL IFEQ) when Redis 8.4+ becomes the minimum supported version - Add NOTE to Dispose() methods in RedisCacheClient, RedisFileStorage, and RedisQueue about implementing IAsyncDisposable when Foundatio base interfaces add support - Update StackExchange.Redis to 2.13.1 for RESP3 default on AMR
There was a problem hiding this comment.
Pull request overview
Updates the Redis backend to use newer Redis/StackExchange.Redis capabilities by switching the queue dequeue Lua script to LMOVE and refreshing package versions, while adding forward-looking compatibility notes for future Redis/Foundatio interface changes.
Changes:
- Replace
RPOPLPUSHwithLMOVEin the queue dequeue Lua script. - Upgrade
StackExchange.Redisto 2.13.1 and bump a few supporting package references. - Add NOTE comments documenting future migration paths (native IFEQ commands;
IAsyncDisposablesupport when Foundatio interfaces allow it).
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/Foundatio.Redis/Scripts/DequeueId.lua | Switches dequeue move operation to LMOVE (Redis 6.2+). |
| src/Foundatio.Redis/Scripts/ReplaceIfEqual.lua | Adds note about future replacement with native conditional SET. |
| src/Foundatio.Redis/Scripts/RemoveIfEqual.lua | Adds note about future replacement with native conditional DEL. |
| src/Foundatio.Redis/Foundatio.Redis.csproj | Updates StackExchange.Redis package version. |
| src/Foundatio.Redis/Cache/RedisCacheClient.cs | Adds note about implementing IAsyncDisposable later. |
| src/Foundatio.Redis/Queues/RedisQueue.cs | Adds note about implementing IAsyncDisposable later. |
| src/Foundatio.Redis/Storage/RedisFileStorage.cs | Adds note about implementing IAsyncDisposable later. |
| build/common.props | Updates Microsoft.SourceLink.GitHub package version. |
| samples/Foundatio.SampleJob/Foundatio.SampleJob.csproj | Updates Microsoft.Extensions.Logging.Console package version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
RPOPLPUSHwithLMOVEinDequeueId.lua(available since Redis 6.2, RPOPLPUSH deprecated)RemoveIfEqual.luaandReplaceIfEqual.luaabout replacing with native CAS/CAD commands (SET ... IFEQ/DEL ... IFEQ) when Redis 8.4+ becomes the minimum supported version (SE.Redis 2.10.1+)Dispose()inRedisCacheClient,RedisFileStorage, andRedisQueueabout implementingIAsyncDisposablewhen Foundatio base interfaces add supportStackExchange.Redisto 2.13.1 (RESP3 default for Azure Managed Redis endpoints)Context
Based on review of https://stackexchange.github.io/StackExchange.Redis/ and https://stackexchange.github.io/StackExchange.Redis/Resp3:
Test plan