Server

Server #

Three commands in the data surface. Everything else an operator needs (RAFT, CLUSTER, MACHINE, BARRIER, AUTH, SHUTDOWN, VERSION) lives in System commands.

CmdRWSyntaxReturnsExample → reply
INFORINFObulk multi-line reportINFO → # Server\r\nversion…
FLUSHALLWFLUSHALLinteger keys removedFLUSHALL → (integer) 42
FLUSHDBWFLUSHDBinteger keys removed — alias of FLUSHALLFLUSHDB → (integer) 42

INFO takes no arguments #

INFO memory, INFO server and INFO replication are argument errors; the command is len(args) != 1 → wrong number of arguments. Ask for INFO and read the section you need out of the single reply. The sections and their fields are documented in Observability.

INFO is a read command: the receiving node answers from its own state, and it is never replicated.

FLUSHDB is FLUSHALL #

The engine has one logical database, so FLUSHDB is implemented as an alias of FLUSHALL. Both:

  • are write commands, so they go through the Raft log and are replicated (that is why they return a count rather than OK);
  • delete every key in every per-type keyspace (string, hash, list, set, zset) including their expirations;
  • are unrecoverable — there is no undo and no soft delete. Treat them as root-equivalent operations.

Not implemented #

CommandStatus
SELECTNot implemented — one database, always index 0
DBSIZENot registered
KEYSNot registered — use SCAN
MULTI / EXEC / WATCHNot implemented — no transactions in the command surface
MONITORNot exposed as a command
CONFIG GET/SETNot implemented — configuration is flags only