Redis Software Active-Active (CRDB) uses conflict-free replicated data types (CRDTs) to enable multi-region writes without conflicts. Because of this architecture, certain commands that operate atomically across multiple keys aren't supported, as they can't be safely replicated across regions. When these commands are executed, they can cause replication errors, sync disruptions, or service instability.
This article explains how to identify unsupported command usage using Quick Fix guidance, detect the exact command through Step-by-Step Instructions, prevent future occurrences using Best Practices, and resolve incidents in Troubleshooting.
Quick Fix
| Issue | Resolution |
|---|---|
Errors such as ERR command is not supported in Active-Active/CRDB |
Identify the command in logs and replace it with a supported single-key pattern. |
| Replication or syncer errors in logs | Audit recent commands and stop multi-key operations. |
| Workload disruption after deployment | Roll back recent changes and remove unsupported command usage. |
| Unknown command causing instability | Use MONITOR or SLOWLOG in staging to capture and identify the command. |
Prerequisites
Access to Redis Software cluster logs or admin console
Ability to review application logs
Non-production environment for MONITOR or SLOWLOG testing
Familiarity with Redis command behavior and CRDB limitations
Step-by-Step Instructions
Step 1: Identify Error Signals
Check for CRDB-specific command errors
-
Look for errors such as:
ERR command is not supported in Active-Active/CRDB
Review application logs for failed commands
Check cluster and database logs
-
Look for:
Syncer failures
Replication errors
Unexpected shutdown or restart messages
Step 2: Capture the Offending Command
Use application logs (preferred)
Identify the exact command and the client issuing it
Use MONITOR in a staging environment
Replay traffic safely
Capture real-time commands sent to Redis
Use SLOWLOG for auditing
-
Temporarily set a low threshold:
CONFIG SET slowlog-log-slower-than 0 Review logged commands for multi-key patterns
Step 3: Audit for Unsupported Patterns
Common unsupported multi-key commands include:
SINTERSTORE,SUNIONSTORE,SDIFFSTOREZINTERSTORE,ZUNIONSTOREBITOPMSETNXSORT ... STORE
Also review:
Lua scripts using multiple
KEYSCross-key atomic operations
Rename or move operations affecting multiple keys
Note: Not all multi-key commands are blocked. Always validate against your CRDB supported command matrix.
Step 4: Refactor to Supported Patterns
Replace multi-key operations with client-side logic
Fetch individual keys and compute results in the application
Write results back using single-key operations
Use pipelining instead of atomic multi-key commands
Execute sequential single-key operations efficiently
Restrict Lua usage
Limit scripts to a single key
Ensure operations are idempotent
Best Practices for Prevention
Enforce command guardrails
Maintain an allowlist of approved commands for CRDB workloads
-
Use ACLs to block unsupported commands:
Example: deny
SINTERSTORE,ZUNIONSTORE,BITOP
Add pre-deployment validation
Run integration tests against a CRDB cluster
Detect unsupported commands before production rollout
Monitor proactively
Track error rates for unsupported commands
Alert on spikes in CRDB-related errors
Maintain a runbook
Identify affected service or client
Disable feature flags or reroute traffic
Replace unsupported command patterns
Troubleshooting
Issue: Command not identified
Use MONITOR or SLOWLOG in staging with traffic replay
Correlate timestamps between logs and application activity
Issue: Syncer or replication failure
Check logs for unsupported command errors
Stop the offending workload immediately
Issue: Intermittent errors
Look for conditional logic in application code
Audit recent deployments or feature changes
Issue: Repeated failures after fix
Verify all services using the database have been updated
Check for background jobs or scripts still using old patterns
If the Issue Occurs Again
Capture detailed logs
Include timestamps and error messages from both client and server
Reproduce safely
Replay traffic in a staging environment using MONITOR or SLOWLOG
Validate against CRDB compatibility
Confirm whether the command is supported for your version
Escalate if needed
Provide logs and timestamps to Redis Support to trace the exact command and source
0 comments
Please sign in to leave a comment.