Skip to content

Replace deprecated RPOPLPUSH with LMOVE and add SE.Redis compatibility notes#164

Merged
niemyjski merged 1 commit into
mainfrom
feature/se-redis-compatibility-improvements
May 12, 2026
Merged

Replace deprecated RPOPLPUSH with LMOVE and add SE.Redis compatibility notes#164
niemyjski merged 1 commit into
mainfrom
feature/se-redis-compatibility-improvements

Conversation

@niemyjski
Copy link
Copy Markdown
Member

@niemyjski niemyjski commented May 12, 2026

Summary

  • Replace deprecated RPOPLPUSH with LMOVE in DequeueId.lua (available since Redis 6.2, RPOPLPUSH deprecated)
  • Add NOTE comments 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 (SE.Redis 2.10.1+)
  • Add NOTE comments next to Dispose() in RedisCacheClient, RedisFileStorage, and RedisQueue about implementing IAsyncDisposable when Foundatio base interfaces add support
  • Update StackExchange.Redis to 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:

  • RESP3 compatibility is already well-covered by existing test classes running under both protocols
  • No obsolete SE.Redis APIs are in use
  • Lua scripts return simple types unaffected by RESP3 type conversions

Test plan

  • Existing tests pass (RPOPLPUSH -> LMOVE is a behavioral equivalent)
  • RESP3 test classes continue to pass
  • Verify Redis 6.2+ is the minimum in CI (LMOVE requires 6.2+)

- 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
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 RPOPLPUSH with LMOVE in the queue dequeue Lua script.
  • Upgrade StackExchange.Redis to 2.13.1 and bump a few supporting package references.
  • Add NOTE comments documenting future migration paths (native IFEQ commands; IAsyncDisposable support 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.

Comment thread src/Foundatio.Redis/Scripts/DequeueId.lua
@niemyjski niemyjski merged commit f77ee64 into main May 12, 2026
8 checks passed
@niemyjski niemyjski deleted the feature/se-redis-compatibility-improvements branch May 12, 2026 20:45
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.

2 participants