Skip to content

Commit

Permalink
Merge branch 'main' into DOC-4709
Browse files Browse the repository at this point in the history
  • Loading branch information
cmilesb committed Jan 21, 2025
2 parents 44cfcda + fc3905b commit 81d69b4
Show file tree
Hide file tree
Showing 99 changed files with 2,505 additions and 5,209 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
/data/repos.json
/data/tool_types.json
/data/versions.json
/data/components_local/
/examples
build/components/__pycache__/
venv/**
Expand All @@ -14,3 +15,4 @@ package-lock.json
.hugo_build.lock
.vscode/
.DS_Store
.idea
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ HUGO_BUILD=--gc

all: clean deps components hugo
serve: clean deps components serve_hugo
localserve: clean deps components_local serve_hugo

deps:
@npm install
Expand All @@ -13,6 +14,9 @@ deps:
components:
@python3 build/make.py

components_local:
@python3 build/make.py --stack ./data/components_local/index.json

hugo:
@hugo $(HUGO_DEBUG) $(HUGO_BUILD)

Expand Down
8 changes: 6 additions & 2 deletions content/commands/auth/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ The AUTH command authenticates the current connection in two cases:
Redis versions prior of Redis 6 were only able to understand the one argument
version of the command:

AUTH <password>
{{< clients-example cmds_cnxmgmt auth1 >}}
AUTH "temp-pass"
{{< /clients-example >}}

This form just authenticates against the password set with `requirepass`.
In this configuration Redis will deny any command executed by the just
Expand All @@ -62,7 +64,9 @@ Otherwise, an error is returned and the clients needs to try a new password.

When Redis ACLs are used, the command should be given in an extended way:

AUTH <username> <password>
{{< clients-example cmds_cnxmgmt auth2 >}}
AUTH "test-user" "strong_password"
{{< /clients-example >}}

In order to authenticate the current connection with one of the connections
defined in the ACL list (see [`ACL SETUSER`]({{< relref "/commands/acl-setuser" >}})) and the official [ACL guide]({{< relref "/operate/oss_and_stack/management/security/acl" >}}) for more information.
Expand Down
12 changes: 12 additions & 0 deletions content/commands/cluster-forget/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ complexity: O(1)
description: Removes a node from the nodes table.
group: cluster
hidden: false
history:
- - 7.2.0
- Forgotten nodes are automatically propagated across the cluster via gossip.
linkTitle: CLUSTER FORGET
since: 3.0.0
summary: Removes a node from the nodes table.
Expand All @@ -49,6 +52,10 @@ table of the node receiving the command, it also implements a ban-list, not
allowing the same node to be added again as a side effect of processing the
*gossip section* of the heartbeat packets received from other nodes.

Starting with Redis 7.2.0, the ban-list is included in cluster gossip ping/pong messages.
This means that `CLUSTER FORGET` doesn't need to be sent to all nodes in a cluster.
You can run the command on one or more nodes, after which it will be propagated to the rest of the nodes in most cases.

## Details on why the ban-list is needed

In the following example we'll show why the command must not just remove
Expand Down Expand Up @@ -86,3 +93,8 @@ The command does not succeed and returns an error in the following cases:
1. The specified node ID is not found in the nodes table.
2. The node receiving the command is a replica, and the specified node ID identifies its current master.
3. The node ID identifies the same node we are sending the command to.

## Behavior change history

* `>= 7.2.0`: Automatically propagate node deletion to other nodes in a cluster, allowing nodes to be deleted with a single call
in most cases.
4 changes: 4 additions & 0 deletions content/commands/flushall/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ It is possible to use one of the following modifiers to dictate the flushing mod
* `ASYNC`: flushes the databases asynchronously
* `SYNC`: flushes the databases synchronously

{{< clients-example cmds_servermgmt flushall >}}
FLUSHALL SYNC
{{< /clients-example >}}

## Notes

* An asynchronous `FLUSHALL` command only deletes keys that were present at the time the command was invoked. Keys created during an asynchronous flush will be unaffected.
Expand Down
14 changes: 14 additions & 0 deletions content/commands/hgetall/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,20 @@ of the reply is twice the size of the hash.

## Examples

{{< clients-example cmds_hash hgetall >}}
redis> HSET myhash field1 "Hello"
(integer) 1
redis> HSET myhash field2 "World"
(integer) 1
redis> HGETALL myhash
1) "field1"
2) "Hello"
3) "field2"
4) "World"
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
HSET myhash field1 "Hello"
HSET myhash field2 "World"
Expand Down
12 changes: 12 additions & 0 deletions content/commands/hvals/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@ Returns all values in the hash stored at `key`.

## Examples

{{< clients-example cmds_hash hvals >}}
redis> HSET myhash field1 "Hello"
(integer) 1
redis> HSET myhash field2 "World"
(integer) 1
redis> HVALS myhash
1) "Hello"
2) "World"
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
HSET myhash field1 "Hello"
HSET myhash field2 "World"
Expand Down
10 changes: 5 additions & 5 deletions content/commands/incrbyfloat/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ regardless of the actual internal precision of the computation.
## Examples

{{% redis-cli %}}
SET mykey 10.50
INCRBYFLOAT mykey 0.1
INCRBYFLOAT mykey -5
SET mykey 5.0e3
INCRBYFLOAT mykey 2.0e2
SET mykey "10.50"
INCRBYFLOAT mykey "0.1"
INCRBYFLOAT mykey "-5"
SET mykey "5.0e3"
INCRBYFLOAT mykey "2.0e2"
{{% /redis-cli %}}


Expand Down
6 changes: 6 additions & 0 deletions content/commands/info/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ It can also take the following values:

When no parameter is provided, the `default` option is assumed.

{{< clients-example cmds_servermgmt info >}}
INFO
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
INFO
{{% /redis-cli %}}
Expand Down
11 changes: 11 additions & 0 deletions content/commands/llen/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@ An error is returned when the value stored at `key` is not a list.

## Examples

{{< clients-example cmds_list llen >}}
redis> LPUSH mylist "World"
(integer) 1
redis> LPUSH mylist "Hello"
(integer) 2
redis> LLEN mylist
(integer) 2
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
LPUSH mylist "World"
LPUSH mylist "Hello"
Expand Down
15 changes: 15 additions & 0 deletions content/commands/lpop/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,21 @@ to `count` elements, depending on the list's length.

## Examples

{{< clients-example cmds_list lpop >}}
redis> RPUSH mylist "one" "two" "three" "four" "five"
(integer) 5
redis> LPOP mylist
"one"
redis> LPOP mylist 2
1) "two"
2) "three"
redis> LRANGE mylist 0 -1
1) "four"
2) "five"
{{< /clients-example>}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
RPUSH mylist "one" "two" "three" "four" "five"
LPOP mylist
Expand Down
12 changes: 11 additions & 1 deletion content/commands/lpush/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,20 @@ So for instance the command `LPUSH mylist a b c` will result into a list
containing `c` as first element, `b` as second element and `a` as third element.

## Examples
{{< clients-example cmds_list lpush >}}
redis> LPUSH mylist "world"
(integer) 1
redis> LPUSH mylist "hello"
(integer) 2
redis> LRANGE mylist 0 -1
1) "hello"
2) "world"
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
LPUSH mylist "world"
LPUSH mylist "hello"
LRANGE mylist 0 -1
{{% /redis-cli %}}

24 changes: 23 additions & 1 deletion content/commands/lrange/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,29 @@ the last element of the list.

## Examples

{{< clients-example cmds_list lrange >}}
redis> RPUSH mylist "one"
(integer) 1
redis> RPUSH mylist "two"
(integer) 2
redis> RPUSH mylist "three"
(integer) 3
redis> LRANGE mylist 0 0
1) "one"
redis> LRANGE mylist -3 2
1) "one"
2) "two"
3) "three"
redis> LRANGE mylist -100 100
1) "one"
2) "two"
3) "three"
redis> LRANGE mylist 5 10
(empty array)
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
RPUSH mylist "one"
RPUSH mylist "two"
Expand All @@ -89,4 +112,3 @@ LRANGE mylist -3 2
LRANGE mylist -100 100
LRANGE mylist 5 10
{{% /redis-cli %}}

16 changes: 15 additions & 1 deletion content/commands/rpop/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,24 @@ to `count` elements, depending on the list's length.

## Examples

{{< clients-example cmds_list rpop >}}
redis> RPUSH mylist "one" "two" "three" "four" "five"
(integer) 5
redis> RPOP mylist
"five"
redis> RPOP mylist 2
1) "four"
2) "three"
redis> LRANGE mylist 0 -1
1) "one"
2) "two"
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
RPUSH mylist "one" "two" "three" "four" "five"
RPOP mylist
RPOP mylist 2
LRANGE mylist 0 -1
{{% /redis-cli %}}

12 changes: 12 additions & 0 deletions content/commands/rpush/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,18 @@ containing `a` as first element, `b` as second element and `c` as third element.

## Examples

{{< clients-example cmds_list rpush >}}
redis> RPUSH mylist "hello"
(integer) 1
redis> RPUSH mylist "world"
(integer) 2
redis> LRANGE mylist 0 -1
1) "hello"
2) "world"
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
RPUSH mylist "hello"
RPUSH mylist "world"
Expand Down
15 changes: 14 additions & 1 deletion content/commands/sadd/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,23 @@ An error is returned when the value stored at `key` is not a set.

## Examples

{{< clients-example cmds_set sadd >}}
redis> SADD myset "Hello"
(integer) 1
redis> SADD myset "World"
(integer) 1
redis> SADD myset "World"
(integer) 0
redis> SMEMBERS myset
1) "Hello"
2) "World"
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
SADD myset "Hello"
SADD myset "World"
SADD myset "World"
SMEMBERS myset
{{% /redis-cli %}}

13 changes: 12 additions & 1 deletion content/commands/smembers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,20 @@ This has the same effect as running [`SINTER`]({{< relref "/commands/sinter" >}}

## Examples

{{< clients-example cmds_set smembers >}}
redis> SADD myset "Hello"
(integer) 1
redis> SADD myset "World"
(integer) 1
redis> SMEMBERS myset
1) "Hello"
2) "World"
{{< /clients-example >}}

Give these commands a try in the interactive console:

{{% redis-cli %}}
SADD myset "Hello"
SADD myset "World"
SMEMBERS myset
{{% /redis-cli %}}

Loading

0 comments on commit 81d69b4

Please sign in to comment.