Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Command Restrictions

Updated on 2024-09-30 GMT+08:00

Some Redis commands are supported by Redis Cluster instances for multi-key operations in the same slot. Restricted commands are listed in Table 1.

Some commands support multiple keys but do not support cross-slot access. For details, see Table 3. Restricted commands are listed in Table 2.

Table 4 lists commands restricted for read/write splitting instances.

NOTE:

While running commands that take a long time to run, such as FLUSHALL, DCS instances may not respond to other commands and may change to the faulty state. After the command finishes executing, the instance will return to normal.

Redis Commands Restricted in Redis Cluster DCS Instances

Table 1 Redis commands restricted in Redis Cluster DCS instances

Category

Description

Set

SINTER

Returns the members of the set resulting from the intersection of all the given sets.

SINTERSTORE

Equal to SINTER, but instead of returning the result set, it is stored in destination.

SUNION

Returns the members of the set resulting from the union of all the given sets.

SUNIONSTORE

Equal to SUNION, but instead of returning the result set, it is stored in destination.

SDIFF

Returns the members of the set resulting from the difference between the first set and all the successive sets.

SDIFFSTORE

Equal to SDIFF, but instead of returning the result set, it is stored in destination.

SMOVE

Moves member from the set at source to the set at destination.

Sorted Set

ZUNIONSTORE

Computes the union of numkeys sorted sets given by the specified keys.

ZINTERSTORE

Computes the intersection of numkeys sorted sets given by the specified keys.

HyperLogLog

PFCOUNT

Returns the approximated cardinality computed by the HyperLogLog data structure stored at the specified variable.

PFMERGE

Merges multiple HyperLogLog values into a unique value.

Key

RENAME

Renames key to newkey.

RENAMENX

Renames key to newkey if newkey does not yet exist.

BITOP

Performs a bitwise operation between multiple keys (containing string values) and stores the result in the destination key.

RPOPLPUSH

Returns and removes the last element (tail) of the list stored at source, and pushes the element at the first element (head) of the list stored at destination.

String

MSETNX

Sets the given keys to their respective values.

Redis Commands Restricted in Proxy Cluster DCS Instances

Table 2 Redis commands restricted in Proxy Cluster DCS instances

Category

Command

Restriction

Sets

SMOVE

For a Proxy Cluster instance, the source and destination keys must be in the same slot.

Sorted sets

BZPOPMAX

For a Proxy Cluster instance, all keys transferred must be in the same slot.

Not supported for Proxy Cluster DCS Redis 4.0 instances.

BZPOPMIN

Geo

GEORADIUS

  • For a Proxy Cluster instance, all keys transferred must be in the same slot.
  • For a Proxy Cluster instance with multiple databases, the STORE option is not supported.

GEORADIUSBYMEMBER

GEOSEARCHSTORE

Connection

CLIENT KILL

  • Only the following two formats are supported:
    • CLIENT KILL ip:port
    • CLIENT KILL ADDR ip:port
  • The id field has a random value, and it does not meet the idc1<idc2→Tc1<Tc2 requirement.

CLIENT LIST

  • Only the following two formats are supported:
    • CLIENT LIST
    • CLIENT LIST [TYPE normal|master|replica|pubsub]
  • The id field has a random value, and it does not meet the idc1<idc2→Tc1<Tc2 requirement.

SELECT index

Multi-DB of Proxy Cluster instances can be implemented by changing the keys. This solution is not recommended.

For details about multi-DB restrictions on Proxy Cluster instances, see What Are the Constraints on Implementing Multiple Databases on a Proxy Cluster Instance?

HyperLogLog

PFCOUNT

For a Proxy Cluster instance, all keys transferred must be in the same slot.

PFMERGE

Keys

RENAME

For a Proxy Cluster instance, all keys transferred must be in the same slot.

RENAMENX

SCAN

  • Proxy Cluster instances do not support the SCAN command in pipelines.
  • For a Proxy Cluster instance, you can issue the SCAN command to a specific shard by adding ip:port. (Shard IP addresses and ports can be queried through the icluster nodes command.)

    If the SCAN command issued on the specified shard does not return a desired response, your proxies may be an earlier version. In this case, contact technical support.

    icluster nodes
    xxx 192.168.00.00:1111@xxx xxx connected 10923-16383 
    xxx 192.168.00.01:2222@xxx xxx connected 0-5460 
    xxx 192.168.00.02:3333@xxx xxx connected 5461-10922
    SCAN 0 match * COUNT 5 192.168.00.02:3333
    1) "0"
    2) 1) "key1"
       2) "key2"
       3) "key3"
       4) "key4"
       5) "key5"

Lists

BLPOP

For a Proxy Cluster instance, all keys transferred must be in the same slot.

BRPOP

BRPOPLPUSH

Pub/Sub

PSUBSCRIBE

Proxy Cluster instances do not support keyspace event subscription, so there would be no keyspace event subscription failure.

Scripting

EVAL

  • For a Proxy Cluster instance, all keys transferred must be in the same slot.
  • When the multi-DB function is enabled for a Proxy Cluster instance, the KEYS parameter will be modified. Pay attention to the KEYS parameter used in the Lua script.

EVALSHA

Server

MEMORY DOCTOR

For a Proxy Cluster instance, add the ip:port of the node at the end of the command.

Do as follows to obtain the IP address and port number of a node (MEMORY USAGE is used as an example):

  1. Run the cluster keyslot key command to query the slot number of a key.
  2. Run the icluster nodes command to query the IP address and port number corresponding to the slot where the key is.

    If the required information is not returned after you run the icluster nodes command, your Proxy Cluster instance may be of an earlier version. In this case, run the cluster nodes command.

  3. Run the MEMORY USAGE key ip:port command.

    If multi-DB is enabled for the Proxy Cluster instance, run the MEMORY USAGE xxx:As {key} ip:port command, where xxx indicates the DB where the key value is. For example, DB0, DB1, and DB255 correspond to 000, 001, and 255, respectively.

    The following is an example for a single-DB Proxy Cluster instance:
    set key1 value1
    OK
    get key1
    value1
    cluster keyslot key1
    9189
    icluster nodes
    xxx 192.168.00.00:1111@xxx xxx connected 10923-16383 
    xxx 192.168.00.01:2222@xxx xxx connected 0-5460 
    xxx 192.168.00.02:3333@xxx xxx connected 5461-10922
    MEMORY USAGE key1 192.168.00.02:3333
    54

MEMORY HELP

MEMORY MALLOC-STATS

MEMORY PURGE

MEMORY STATS

MEMORY USAGE

MONITOR

Strings

BITOP

For a Proxy Cluster instance, all keys transferred must be in the same slot.

MSETNX

Transactions

WATCH

For a Proxy Cluster instance, all keys transferred must be in the same slot.

MULTI

The order of cross-slot commands in a transaction is not guaranteed.

The following commands cannot be used in transactions: WATCH, MONITOR, RANDOMKEY, KEYS, SCAN, SUBSCRIBE, UNSUBSCRIBE, PSUBSCRIBE, PUNSUBSCRIBE, SCRIPT, EVAL, EVALSHA, DBSIZE, AUTH, FLUSHDB, FLUSHALL, CLIENT, MEMORY

EXEC

Streams

XACK

Currently, Proxy Cluster instances do not support Streams.

XADD

XCLAIM

XDEL

XGROUP

XINFO

XLEN

XPENDING

XRANGE

XTRIM

XREVRANGE

XREAD

XREADGROUP GROUP

XAUTOCLAIM

Multi-Key Commands of Proxy Cluster Instances

Table 3 Multi-key commands of Proxy Cluster instances

Category

Command

Multi-key commands that support cross-slot access

DEL, MGET, MSET, EXISTS, SUNION, SINTER, SDIFF, SUNIONSTORE, SINTERSTORE, SDIFFSTORE, ZUNIONSTORE, ZINTERSTORE

Multi-key commands that do not support cross-slot access

SMOVE, SORT, BITOP, MSETNX, RENAME, RENAMENX, BLPOP, BRPOP, RPOPLPUSH, BRPOPLPUSH, PFMERGE, PFCOUNT, BLMOVE, COPY, GEOSEARCHSTORE, LMOVE, ZRANGESTORE

Redis Commands Restricted for Read/Write Splitting Instances

Table 4 Redis commands restricted for read/write splitting instances

Category

Command

Restriction

Connection

CLIENT KILL

  • Only the following two formats are supported:
    • CLIENT KILL ip:port
    • CLIENT KILL ADDR ip:port
  • The id field has a random value, and it does not meet the idc1<idc2→Tc1<Tc2 requirement.

CLIENT LIST

  • Only the following two formats are supported:
    • CLIENT LIST
    • CLIENT LIST [TYPE normal|master|replica|pubsub]
  • The id field has a random value, and it does not meet the idc1<idc2→Tc1<Tc2 requirement.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback