Skip to content

Conversation

@a-TODO-rov
Copy link
Contributor

resolves #3498

@a-TODO-rov a-TODO-rov requested review from tishun and uglide November 6, 2025 11:55
@a-TODO-rov a-TODO-rov requested review from Copilot and removed request for tishun and uglide November 6, 2025 18:54
Copy link
Contributor

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

This PR adds support for two new Redis commands (DIGEST and DELEX) and introduces conditional value operations through a new ValueCondition abstraction. The changes enable value-based and digest-based conditional operations for SET, SETGET, and DELEX commands.

  • Introduces ValueCondition<V> class supporting value equality/inequality and digest-based comparisons
  • Adds digestKey() command to compute XXH3 64-bit digests of string values
  • Adds delex() command for conditional key deletion with value/digest guards
  • Extends SET and SETGET commands to support conditional operations via ValueCondition

Reviewed Changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated no comments.

Show a summary per file
File Description
ValueCondition.java New class providing abstraction for conditional value comparisons with factory methods for equality, inequality, and digest-based conditions
CommandType.java Adds DIGEST and DELEX command types to the protocol enum
CommandKeyword.java Adds IFEQ, IFNE, IFDEQ, IFDNE keywords for conditional operations
ReadOnlyCommands.java Registers DIGEST as a read-only command
RedisCommandBuilder.java Implements command builders for digestKey, delex, and conditional set/setGet variants
RedisStringCommands.java (template) Adds API signatures for digestKey and conditional set/setGet operations
RedisKeyCommands.java (template) Adds API signature for delex operation
Abstract/Reactive/Async implementations Implements command dispatch for all API variants (sync, async, reactive, coroutines)
Cluster node selection interfaces Adds cluster support for new commands
StringCommandIntegrationTests.java Adds comprehensive tests for digestKey and conditional SET/SETGET operations
KeyCommandIntegrationTests.java Adds tests for delex with various conditions
KeyClusterCommandIntegrationTests.java Adds cluster-specific tests for delex
MasterReplicaIntegrationTests.java Adds test verifying DIGEST can be read from replicas
ClusterReadOnlyCommandsUnitTests.java Updates expected read-only command count from 100 to 101

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

Add support for CAS/CAD commands

2 participants