You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Materia KV](/doc/addons/materia-kv/) adds six new commands to its Redis-compatible layer, expanding hash, string and TTL management capabilities:
20
+
21
+
-`GETDEL`: atomically get a string value and delete its key
22
+
-`HEXISTS`: check if a field exists in a hash
23
+
-`HSETNX`: set a hash field only if it does not already exist
24
+
-`HINCRBY`: increment the integer value of a hash field
25
+
-`EXPIREAT`: set key expiration using an absolute Unix timestamp in seconds
26
+
-`PEXPIREAT`: set key expiration using an absolute Unix timestamp in milliseconds
27
+
28
+
These commands are available for new and already deployed add-ons, with no additional configuration.
29
+
30
+
This update also brings reliability improvements to the underlying storage layer.
31
+
32
+
The `SCAN`, `HSCAN`, `SSCAN` and `KEYS` commands now produce more accurate results thanks to fixes in the scan boundary logic.
33
+
34
+
Transactions now enforce retry limits of 5 retries with a 5-second timeout, preventing cascading retries from overwhelming the cluster under heavy contention. Previously, transactions could retry indefinitely on conflict.
35
+
36
+
-[Learn more about Materia KV](/doc/addons/materia-kv/)
37
+
-[Learn more about Materia KV supported commands](/doc/addons/materia-kv/#supported-types-and-commands)
Copy file name to clipboardExpand all lines: content/doc/addons/materia-kv.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -154,19 +154,24 @@ Find below the list of currently supported commands:
154
154
|`DEL`| Removes the specified `key`. A key is ignored if it doesn't exist. |
155
155
|`EXISTS`| Returns if `key` exists. |
156
156
|`EXPIRE`| Set a `key` time to live in seconds. After the timeout has expired, the `key` will be automatically deleted. The time to live can be updated using the `EXPIRE` command or cleared using the `PERSIST` command. |
157
+
|`EXPIREAT`| Set a `key` to expire at the specified Unix timestamp (in seconds). After that time, the `key` will be automatically deleted. Returns `1` if the timeout was set, `0` if the `key` does not exist. |
157
158
|`FLUSHALL`| Delete all the keys of all the existing databases, not just the currently selected one. This command never fails. |
158
159
|`FLUSHDB`| Delete all the keys of the currently selected DB. This command never fails. |
159
160
|`GET`| Get the value of `key`. If the `key` doesn't exist the special value nil is returned. An error is returned if the value stored at `key` is not a string, because `GET` only handles string values. |
160
161
|`GETBIT`| Returns the bit value at offset in the string value stored at `key`. |
162
+
|`GETDEL`| Get the value of `key` and delete the key. If the `key` doesn't exist, `nil` is returned. An error is returned if the value stored at `key` is not a string. |
161
163
|`GETRANGE`| Returns the substring of the string value stored at `key`, determined by the offsets start and end (both are inclusive). Negative offsets can be used in order to provide an offset starting from the end of the string. So `-1` means the last character, `-2` the penultimate and so forth. |
162
164
|`HDEL`| Removes the specified fields from the hash stored at `key`. Specified fields that do not exist within this hash are ignored. If `key` does not exist, it is treated as an empty hash and this command returns `0`. |
163
165
|`HELLO`| Switch to a different protocol, optionally authenticating and setting the connection's name, or provide a contextual client report. It always replies with a list of current server and connection properties. |
166
+
|`HEXISTS`| Returns `1` if `field` exists in the hash stored at `key`, `0` if `field` or `key` do not exist. An error is returned if the value stored at `key` is not a hash. |
164
167
|`HGET`| Returns the value associated with `field` in the hash stored at `key`. If `key` does not exist, or `field` is not present in the hash, `nil` is returned. |
165
168
|`HGETALL`| Returns all fields and values of the hash stored at `key`. In the returned value, every field name is followed by its value, so the length of the reply is twice the size of the hash. |
169
+
|`HINCRBY`| Increments the number stored at `field` in the hash stored at `key` by the given `increment`. If `key` does not exist, a new key holding a hash is created. If `field` does not exist, the value is set to `0` before performing the operation. An error is returned if the field contains a value of the wrong type or the resulting value exceeds a 64-bit signed integer. |
166
170
|`HLEN`| Returns the number of fields contained in the hash stored at `key`. If `key` does not exist, it is treated as an empty hash and `0` is returned. |
167
171
|`HMGET`| Returns the values associated with the specified `fields` in the hash stored at `key`. For every field that does not exist in the hash, a `nil` value is returned. Because of this, the operation never fails. |
168
172
|`HSCAN`| Incrementally iterate over hash fields and associated values. It is a cursor based iterator, this means that at every call of the command, the server returns an updated cursor that the user needs to use as the cursor argument in the next call. An iteration starts when the cursor is set to `0`, and terminates when the cursor returned by the server is `0`. |
169
173
|`HSET`| Sets the specified fields to their respective values in the hash stored at `key`. If `key` does not exist, a new key holding a hash is created. If `key` exists but does not hold a hash, an error is returned. |
174
+
|`HSETNX`| Sets `field` in the hash stored at `key` to `value`, only if `field` does not yet exist. If `key` does not exist, a new key holding a hash is created. If `field` already exists, the operation has no effect. Returns `1` if `field` is a new field in the hash and the value was set, `0` if `field` already exists. |
170
175
|`INCR`| Increments the number stored at `key` by one. If the `key` doesn't exist, it is set to `0` before performing the operation. An error is returned if `key` contains a value of the wrong type or contains a string that can not be represented as integer. This operation is limited to 64-bit signed integers. |
171
176
|`INCRBY`| Increments the number stored at `key` by the given `increment`. If the `key` doesn't exist, it is set to `0` before performing the operation. An error is returned if `key` contains a value of the wrong type or contains a string that can not be represented as integer. This operation is limited to 64-bit signed integers. |
172
177
|`INCRBYFLOAT`| Increment the string representing a floating point number stored at `key` by the specified `increment`. If the key does not exist, it is set to `0` before performing the operation. An error is returned if the key contains a value of the wrong type or a string that can not be represented as a floating point number. |
@@ -180,6 +185,7 @@ Find below the list of currently supported commands:
180
185
|`MSET`| Sets the given keys to their respective values. `MSET` replaces existing values with new values, just as regular `SET`. `MSET` is atomic, so all given keys are set at once. It is not possible for clients to see that some keys were updated while others are unchanged. |
181
186
|`PERSIST`| Remove the existing time to live associated with the `key`. |
182
187
|`PEXPIRE`| Set a `key` time to live in milliseconds. After the timeout has expired, the `key` will be automatically deleted. The time to live can be updated using the `PEXPIRE` command or cleared using the `PERSIST` command. |
188
+
|`PEXPIREAT`| Set a `key` to expire at the specified absolute Unix timestamp in milliseconds. After that time, the `key` will be automatically deleted. Returns `1` if the timeout was set, `0` if the `key` does not exist. |
183
189
|`PING`| Returns `PONG` if no argument is provided, otherwise return a copy of the argument as a bulk. |
184
190
|`PTTL`| Returns the remaining time to live of a `key`, in milliseconds. |
185
191
|`SADD`| Add the specified members to the set stored at `key`. Specified members that are already a member of this set are ignored. If `key` doesn't exist, a new set is created before adding the specified members. |
@@ -200,9 +206,9 @@ Find below the list of currently supported commands:
200
206
|`SRANDMEMBER`| When called with just the `key` argument, return a random element from the set value stored at `key`. |
201
207
|`SREM`| Remove the specified members from the set stored at `key`. Specified members that are not a member of this set are ignored. If `key` doesn't exist, it is treated as an empty set and this command returns `0`. |
202
208
|`SSCAN`| Incrementally iterate over set elements. It is a cursor based iterator, this means that at every call of the command, the server returns an updated cursor that the user needs to use as the cursor argument in the next call. An iteration starts when the cursor is set to `0`, and terminates when the cursor returned by the server is `0`. |
209
+
|`STRLEN`| Returns the length of the string value stored at `key`. An error is returned when key holds a non-string value. |
203
210
|`SUNION`| Returns the members of the set resulting from the union of all the given sets. |
204
211
|`SUNIONSTORE`| This command is equal to `SUNION`, but instead of returning the resulting set, it is stored in `destination`. If `destination` already exists, it is overwritten. |
205
-
|`STRLEN`| Returns the length of the string value stored at `key`. An error is returned when key holds a non-string value. |
206
212
|`TTL`| Returns the remaining time to live of a `key`, in seconds. |
207
213
|`TYPE`| Returns the string representation of the type of the value stored at `key`. Can be: `hash`, `list`, `set` or `string`. |
0 commit comments