From 7a82527608573a619b86569b8747e03b46c20529 Mon Sep 17 00:00:00 2001 From: Oran Agra Date: Tue, 21 Mar 2023 17:40:33 +0200 Subject: [PATCH 1/5] add docs for CLIENT SETINFO --- commands/client-setinfo.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 commands/client-setinfo.md diff --git a/commands/client-setinfo.md b/commands/client-setinfo.md new file mode 100644 index 0000000000..6e1c3cce26 --- /dev/null +++ b/commands/client-setinfo.md @@ -0,0 +1,18 @@ +The `CLIENT SETINFO` command assigns various info attributes to the current connection which are displayed in the output of `CLIENT LIST` and `CLIENT INFO`. + +Client libraries are expected to pipeline this command after aunthentication on all connections +and ignore failures since they could be connected to an older version that doesn't support them. + +Currently the supported attributes are: +* `lib-name` - meant to hold the name of the client library that's in use. +* `lib-ver` - meant to hod the client library's version. +* `lib-env` - meant to hold some OS or Cloud for cloud-native environment in which it's running, possibly including context provided by the user application. + In case of multiple values, `;` separator shoudl be used. + +There is no limit to the length of these attributes. However it is not possible to use spaces, newlines, or other non-pritable characters this would violate the format of the `CLIENT LIST` reply. + +Note that these attributes are **not** cleared by the RESET command. + +@return + +@simple-string-reply: `OK` if the attribute name was successfully set. From 0549b66b982b429b54e849e304a2ff4885c0a899 Mon Sep 17 00:00:00 2001 From: Oran Agra Date: Tue, 21 Mar 2023 17:43:35 +0200 Subject: [PATCH 2/5] spell --- commands/client-setinfo.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/client-setinfo.md b/commands/client-setinfo.md index 6e1c3cce26..393f0f4333 100644 --- a/commands/client-setinfo.md +++ b/commands/client-setinfo.md @@ -1,15 +1,15 @@ The `CLIENT SETINFO` command assigns various info attributes to the current connection which are displayed in the output of `CLIENT LIST` and `CLIENT INFO`. -Client libraries are expected to pipeline this command after aunthentication on all connections +Client libraries are expected to pipeline this command after authentication on all connections and ignore failures since they could be connected to an older version that doesn't support them. Currently the supported attributes are: * `lib-name` - meant to hold the name of the client library that's in use. * `lib-ver` - meant to hod the client library's version. * `lib-env` - meant to hold some OS or Cloud for cloud-native environment in which it's running, possibly including context provided by the user application. - In case of multiple values, `;` separator shoudl be used. + In case of multiple values, `;` separator should be used. -There is no limit to the length of these attributes. However it is not possible to use spaces, newlines, or other non-pritable characters this would violate the format of the `CLIENT LIST` reply. +There is no limit to the length of these attributes. However it is not possible to use spaces, newlines, or other non-printable characters this would violate the format of the `CLIENT LIST` reply. Note that these attributes are **not** cleared by the RESET command. From 6e8b6cad2c122cc6cb981bf5e6e34d59ee574291 Mon Sep 17 00:00:00 2001 From: Oran Agra Date: Tue, 21 Mar 2023 22:06:13 +0200 Subject: [PATCH 3/5] drop lib-env --- commands/client-setinfo.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/commands/client-setinfo.md b/commands/client-setinfo.md index 393f0f4333..393032c5b7 100644 --- a/commands/client-setinfo.md +++ b/commands/client-setinfo.md @@ -6,8 +6,6 @@ and ignore failures since they could be connected to an older version that doesn Currently the supported attributes are: * `lib-name` - meant to hold the name of the client library that's in use. * `lib-ver` - meant to hod the client library's version. -* `lib-env` - meant to hold some OS or Cloud for cloud-native environment in which it's running, possibly including context provided by the user application. - In case of multiple values, `;` separator should be used. There is no limit to the length of these attributes. However it is not possible to use spaces, newlines, or other non-printable characters this would violate the format of the `CLIENT LIST` reply. From 0cedadc61c822443a92c286dffb286df2212c044 Mon Sep 17 00:00:00 2001 From: Oran Agra Date: Wed, 22 Mar 2023 09:39:49 +0200 Subject: [PATCH 4/5] Update client-setinfo.md --- commands/client-setinfo.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/client-setinfo.md b/commands/client-setinfo.md index 393032c5b7..b6ff217411 100644 --- a/commands/client-setinfo.md +++ b/commands/client-setinfo.md @@ -5,9 +5,9 @@ and ignore failures since they could be connected to an older version that doesn Currently the supported attributes are: * `lib-name` - meant to hold the name of the client library that's in use. -* `lib-ver` - meant to hod the client library's version. +* `lib-ver` - meant to hold the client library's version. -There is no limit to the length of these attributes. However it is not possible to use spaces, newlines, or other non-printable characters this would violate the format of the `CLIENT LIST` reply. +There is no limit to the length of these attributes. However it is not possible to use spaces, newlines, or other non-printable characters that would violate the format of the `CLIENT LIST` reply. Note that these attributes are **not** cleared by the RESET command. From 44cd42a58068e0f54271b93e71b92e927a651b0d Mon Sep 17 00:00:00 2001 From: Oran Agra Date: Wed, 22 Mar 2023 09:45:44 +0200 Subject: [PATCH 5/5] update commands.json --- commands.json | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/commands.json b/commands.json index 2863ecce01..20a6eb1781 100644 --- a/commands.json +++ b/commands.json @@ -2135,6 +2135,42 @@ "stale" ] }, + "CLIENT SETINFO": { + "summary": "Set client or connection specific info", + "since": "7.2.0", + "group": "connection", + "complexity": "O(1)", + "acl_categories": [ + "@slow", + "@connection" + ], + "arity": 4, + "arguments": [ + { + "name": "attr", + "type": "oneof", + "arguments": [ + { + "name": "libname", + "type": "string", + "display_text": "libname", + "token": "LIB-NAME" + }, + { + "name": "libver", + "type": "string", + "display_text": "libver", + "token": "LIB-VER" + } + ] + } + ], + "command_flags": [ + "noscript", + "loading", + "stale" + ] + }, "CLIENT SETNAME": { "summary": "Set the current connection name", "since": "2.6.9", @@ -15076,6 +15112,12 @@ "since": "5.0.0", "group": "stream", "complexity": "O(1)", + "history": [ + [ + "7.2.0", + "Added the `inactive` field." + ] + ], "acl_categories": [ "@read", "@stream", @@ -15199,6 +15241,10 @@ [ "7.0.0", "Added the `max-deleted-entry-id`, `entries-added`, `recorded-first-entry-id`, `entries-read` and `lag` fields" + ], + [ + "7.2.0", + "Added the `active-time` field, and changed the meaning of `seen-time`." ] ], "acl_categories": [