Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEV/OP: cumulative changes for Redis CE 8 #1219

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
643855c
Edits for CE 8.0
dwdougherty Oct 18, 2024
5609631
More edits for CE 8.0
dwdougherty Oct 18, 2024
3233709
More edits for CE 8.0
dwdougherty Oct 22, 2024
ea36136
Address merge conflict
dwdougherty Nov 5, 2024
c39ae61
Merge main
dwdougherty Dec 2, 2024
24c08ac
DEV: module configuration changes for CE8 (#956)
dwdougherty Dec 11, 2024
161f6a7
DEV: ACL changes for CE8 (#975)
dwdougherty Dec 13, 2024
d4502ca
Merge main
dwdougherty Dec 13, 2024
13328f6
Merge branch 'main' into community-edition-8
dwdougherty Jan 3, 2025
28c02aa
async io threads (#1020)
ShooterIT Jan 3, 2025
7def124
Merging main
dwdougherty Jan 24, 2025
147d1fa
DEV: update ACL categories for search commands (#1165)
dwdougherty Feb 14, 2025
edd8a15
Merging main
dwdougherty Feb 14, 2025
42bfc36
DEV+OP: add CE8 changes to INFO cmd & Prometheus for RS pages (#1170)
dwdougherty Feb 18, 2025
b1e937b
DEV: collapse cmd categories and remove Stack from layouts and cmd pa…
dwdougherty Feb 19, 2025
fc4dba5
DEV: deprecate dialogs 1, 3, and 4; config. changes (#1197)
dwdougherty Feb 21, 2025
07d1b12
DEV: update modules API docs for CE8 RC1 (#1207)
dwdougherty Feb 24, 2025
653b6ca
DEV: add new HFE commands (#1204)
dwdougherty Feb 25, 2025
a4fa03c
DEV: some corrections for the previous merge... (#1211)
dwdougherty Feb 25, 2025
50f3ce9
DEV: update installation docs for CE8 (#1218)
dwdougherty Feb 26, 2025
f92ba2f
Merging main
dwdougherty Feb 26, 2025
7093d3e
Apply suggestions from code review
dwdougherty Feb 26, 2025
eee534f
Some more patching via to using
dwdougherty Feb 26, 2025
75edf8c
Patch up botched merge text
dwdougherty Feb 26, 2025
36c239d
Remove more instances of Redis Stack
dwdougherty Feb 26, 2025
e3b8c6c
Apply code review comments
dwdougherty Feb 27, 2025
623de0c
Merge branch 'main' into community-edition-8
dwdougherty Mar 10, 2025
9729c2c
Merge branch 'main' into community-edition-8
dwdougherty Mar 11, 2025
f409cdb
Add ACL info related to index creation
dwdougherty Mar 13, 2025
461046d
Merge branch 'main' into community-edition-8
dwdougherty Mar 18, 2025
27e2ead
Replace instances of baseurl with relref
dwdougherty Mar 18, 2025
1447322
Remove vector-set.md page (prematurely added)
dwdougherty Mar 18, 2025
5756ed9
Merge branch 'main' into community-edition-8
dwdougherty Mar 21, 2025
7c8c0d0
Merge branch 'main' into community-edition-8
dwdougherty Mar 21, 2025
8a7a522
Minor update to archived installation page
dwdougherty Mar 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
DEV: add new HFE commands (#1204)
dwdougherty authored Feb 25, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 653b6cabc60beac7a725049d8cbdd7057b9dfd60
88 changes: 88 additions & 0 deletions content/commands/hgetdel/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
---
acl_categories:
- '@write'
- '@hash'
- '@fast'
arguments:
- display_text: key
key_spec_index: 0
name: key
type: key
- arguments:
- display_text: numfields
name: numfields
type: integer
- display_text: field
multiple: true
name: field
type: string
name: fields
token: FIELDS
type: block
arity: -5
categories:
- docs
- develop
- stack
- oss
- rs
- rc
- oss
- kubernetes
- clients
command_flags:
- write
- fast
complexity: O(N) where N is the number of specified fields
description: Returns the value of a field and deletes it from the hash.
group: hash
hidden: false
key_specs:
- RW: true
access: true
begin_search:
spec:
index: 1
type: index
delete: true
find_keys:
spec:
keystep: 1
lastkey: 0
limit: 0
type: range
linkTitle: HGETDEL
since: 8.0.0
summary: Returns the value of a field and deletes it from the hash.
syntax_fmt: "HGETDEL key FIELDS\_numfields field [field ...]"
syntax_str: "FIELDS\_numfields field [field ...]"
title: HGETDEL
---
Get and delete the value of one or more fields of a given hash key. When the last field is deleted, the key will also be deleted.

## Example

```
redis> HSET mykey field1 "Hello" field2 "World" field3 "!"
(integer) 3
redis> HGETALL mykey
1) "field1"
2) "Hello"
3) "field2"
4) "World"
5) "field3"
6) "!"
redis> HGETDEL mykey FIELDS 2 field3 field4
1) "!"
2) (nil)
redis> HGETALL mykey
1) "field1"
2) "Hello"
3) "field2"
4) "World"
redis> HGETDEL mykey FIELDS 2 field1 field2
1) "Hello"
2) "World"
redis> KEYS *
(empty array)
```
20 changes: 20 additions & 0 deletions content/commands/hgetdel/syntax.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
127 changes: 127 additions & 0 deletions content/commands/hgetex/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
---
acl_categories:
- '@write'
- '@hash'
- '@fast'
arguments:
- display_text: key
key_spec_index: 0
name: key
type: key
- arguments:
- display_text: seconds
name: seconds
token: EX
type: integer
- display_text: milliseconds
name: milliseconds
token: PX
type: integer
- display_text: unix-time-seconds
name: unix-time-seconds
token: EXAT
type: unix-time
- display_text: unix-time-milliseconds
name: unix-time-milliseconds
token: PXAT
type: unix-time
- display_text: persist
name: persist
token: PERSIST
type: pure-token
name: expiration
optional: true
type: oneof
- arguments:
- display_text: numfields
name: numfields
type: integer
- display_text: field
multiple: true
name: field
type: string
name: fields
token: FIELDS
type: block
arity: -5
categories:
- docs
- develop
- stack
- oss
- rs
- rc
- oss
- kubernetes
- clients
command_flags:
- write
- fast
complexity: O(N) where N is the number of specified fields
description: Get the value of one or more fields of a given hash key, and optionally
set their expiration.
group: hash
hidden: false
key_specs:
- RW: true
access: true
begin_search:
spec:
index: 1
type: index
find_keys:
spec:
keystep: 1
lastkey: 0
limit: 0
type: range
notes: RW and UPDATE because it changes the TTL
update: true
linkTitle: HGETEX
since: 8.0.0
summary: Get the value of one or more fields of a given hash key, and optionally set
their expiration.
syntax_fmt: "HGETEX key [EX\_seconds | PX\_milliseconds | EXAT\_unix-time-seconds\
\ |\n PXAT\_unix-time-milliseconds | PERSIST] FIELDS\_numfields field\n [field\
\ ...]"
syntax_str: "[EX\_seconds | PX\_milliseconds | EXAT\_unix-time-seconds | PXAT\_unix-time-milliseconds\
\ | PERSIST] FIELDS\_numfields field [field ...]"
title: HGETEX
---
Get the value of one or more fields of a given hash key and optionally set their expirations (time-to-live or TTL).

## Options

The `HGETEX` command supports a set of options:

* `EX seconds` -- Set the specified expiration time, in seconds.
* `PX milliseconds` -- Set the specified expiration time, in milliseconds.
* `EXAT unix-time-seconds` -- Set the specified Unix time at which the field will expire, in seconds.
* `PXAT unix-time-milliseconds` -- Set the specified Unix time at which the field will expire, in milliseconds.
* `PERSIST` -- Remove the TTL associated with the field.

The `EX`, `PX`, `EXAT`, `PXAT`, and `PERSIST` options are mutually exclusive.

## Example

```
redis> HSET mykey field1 "Hello" field2 "World"
(integer) 2
redis> HGETEX mykey EX 120 FIELDS 1 field1
1) "Hello"
redis> HGETEX mykey EX 100 FIELDS 1 field2
1) "World"
redis> HTTL mykey FIELDS 2 field1 field2
1) (integer) 91
2) (integer) 85
redis> HTTL mykey FIELDS 3 field1 field2 field3
1) (integer) 75
2) (integer) 68
3) (integer) -2
...
redis> HTTL mykey FIELDS 3 field1 field2
1) (integer) -2
2) (integer) -2
redis> HGETALL mykey
(empty array)
```
20 changes: 20 additions & 0 deletions content/commands/hgetex/syntax.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
143 changes: 143 additions & 0 deletions content/commands/hsetex/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
---
acl_categories:
- '@write'
- '@hash'
- '@fast'
arguments:
- display_text: key
key_spec_index: 0
name: key
type: key
- arguments:
- display_text: fnx
name: fnx
token: FNX
type: pure-token
- display_text: fxx
name: fxx
token: FXX
type: pure-token
name: condition
optional: true
type: oneof
- arguments:
- display_text: seconds
name: seconds
token: EX
type: integer
- display_text: milliseconds
name: milliseconds
token: PX
type: integer
- display_text: unix-time-seconds
name: unix-time-seconds
token: EXAT
type: unix-time
- display_text: unix-time-milliseconds
name: unix-time-milliseconds
token: PXAT
type: unix-time
- display_text: keepttl
name: keepttl
token: KEEPTTL
type: pure-token
name: expiration
optional: true
type: oneof
- arguments:
- display_text: numfields
name: numfields
type: integer
- arguments:
- display_text: field
name: field
type: string
- display_text: value
name: value
type: string
multiple: true
name: data
type: block
name: fields
token: FIELDS
type: block
arity: -6
categories:
- docs
- develop
- stack
- oss
- rs
- rc
- oss
- kubernetes
- clients
command_flags:
- write
- denyoom
- fast
complexity: O(N) where N is the number of fields being set.
description: Set the value of one or more fields of a given hash key, and optionally
set their expiration.
group: hash
hidden: false
key_specs:
- RW: true
begin_search:
spec:
index: 1
type: index
find_keys:
spec:
keystep: 1
lastkey: 0
limit: 0
type: range
update: true
linkTitle: HSETEX
since: 8.0.0
summary: Set the value of one or more fields of a given hash key, and optionally set
their expiration.
syntax_fmt: "HSETEX key [FNX | FXX] [EX\_seconds | PX\_milliseconds |\n EXAT\_unix-time-seconds\
\ | PXAT\_unix-time-milliseconds | KEEPTTL]\n FIELDS\_numfields field value [field\
\ value ...]"
syntax_str: "[FNX | FXX] [EX\_seconds | PX\_milliseconds | EXAT\_unix-time-seconds\
\ | PXAT\_unix-time-milliseconds | KEEPTTL] FIELDS\_numfields field value [field\
\ value ...]"
title: HSETEX
---
Set the value of one or more fields of a given hash key, and optionally set their expirations (time-to-live or TTL).

## Options

The `HGETEX` command supports a set of options:

* `FNX` -- Only set the fields if none of them already exist.
* `FXX` -- Only set the fields if all of them already exist.
* `EX seconds` -- Set the specified expiration time in seconds.
* `PX milliseconds` -- Set the specified expiration time in milliseconds.
* `EXAT unix-time-seconds` -- Set the specified Unix time in seconds at which the field will expire.
* `PXAT unix-time-milliseconds` -- Set the specified Unix time in milliseconds at which the field will expire.
* `KEEPTTL` -- Retain the TTL associated with the field.

The `EX`, `PX`, `EXAT`, `PXAT`, and `KEEPTTL` options are mutually exclusive.

## Example

```
redis> HSETEX mykey EXAT 1740470400 FIELDS 2 field1 "Hello" field2 "World"
(integer) 1
redis> HTTL mykey FIELDS 2 field1 field2
1) (integer) 55627
2) (integer) 55627
redis> HSETEX mykey FNX EX 60 FIELDS 2 field1 "Hello" field2 "World"
(integer) 0
redis> HSETEX mykey FXX EX 60 KEEPTTL FIELDS 2 field1 "hello" field2 "world"
(error) ERR Only one of EX, PX, EXAT, PXAT or KEEPTTL arguments can be specified
redis> HSETEX mykey FXX KEEPTTL FIELDS 2 field1 "hello" field2 "world"
(integer) 1
redis> HTTL mykey FIELDS 2 field1 field2
1) (integer) 55481
2) (integer) 55481
```

20 changes: 20 additions & 0 deletions content/commands/hsetex/syntax.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions data/resp2_replies.json
Original file line number Diff line number Diff line change
@@ -575,6 +575,14 @@
"HGETALL": [
"[Array reply](../../develop/reference/protocol-spec#arrays): a list of fields and their values stored in the hash, or an empty list when key does not exist."
],
"HGETDEL": [
"[Array reply](../../develop/reference/protocol-spec#arrays): a list of deleted fields and their values or `nil` for fields that do not exist."
],
"HGETEX": [
"* [Array reply](../../develop/reference/protocol-spec#arrays). For each field:",
" - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist, or if the field exists but has no associated expiration set.",
" - [Integer reply](../../develop/reference/protocol-spec#integers): the expiration in seconds."
],
"HINCRBY": [
"[Integer reply](../../develop/reference/protocol-spec#integers): the value of the field after the increment operation."
],
@@ -648,6 +656,11 @@
"HSET": [
"[Integer reply](../../develop/reference/protocol-spec#integers): the number of fields that were added."
],
"HSETEX": [
"One of the following:",
"* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if no fields were set.",
"* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if all the fields wereset."
],
"HSETNX": [
"One of the following:",
"* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the field already exists in the hash and no operation was performed.",
13 changes: 13 additions & 0 deletions data/resp3_replies.json
Original file line number Diff line number Diff line change
@@ -575,6 +575,14 @@
"HGETALL": [
"[Map reply](../../develop/reference/protocol-spec#maps): a map of fields and their values stored in the hash, or an empty list when key does not exist."
],
"HGETDEL": [
"[Array reply](../../develop/reference/protocol-spec#arrays): a list of deleted fields and their values or `nil` for fields that do not exist."
],
"HGETEX": [
"* [Array reply](../../develop/reference/protocol-spec#arrays). For each field:",
" - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist, or if the field exists but has no associated expiration set.",
" - [Integer reply](../../develop/reference/protocol-spec#integers): the expiration in seconds."
],
"HINCRBY": [
"[Integer reply](../../develop/reference/protocol-spec#integers): the value of the field after the increment operation."
],
@@ -648,6 +656,11 @@
"HSET": [
"[Integer reply](../../develop/reference/protocol-spec#integers): the number of fields that were added."
],
"HSETEX": [
"One of the following:",
"* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if no fields were set.",
"* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if all the fields wereset."
],
"HSETNX": [
"One of the following:",
"* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the field already exists in the hash and no operation was performed.",