Implement CLIENT KILL MAXAGE <maxage>#12299
Merged
oranagra merged 5 commits intoredis:unstablefrom Jan 30, 2024
Merged
Conversation
Adds an ability to kill clients older than a specified age. Also, add missing documentation for `CLIENT KILL ID` to output of `CLIENT help`.
oranagra
reviewed
Jun 11, 2023
Contributor
Author
|
@oranagra Pushed a new commit with CR fixes:
I updated the top PR comment so it's correct when squash-merging. |
oranagra
approved these changes
Jun 19, 2023
Member
|
@redis/core-team please approve |
yossigo
approved these changes
Jan 30, 2024
madolson
reviewed
Jan 30, 2024
Member
|
approved in core-team meeting with the above comment (AGE -> MAXAGE) |
CLIENT KILL AGE <max-age>CLIENT KILL MAXAGE <maxage>
Member
|
@slavak finally merged. |
roggervalf
pushed a commit
to roggervalf/redis
that referenced
this pull request
Feb 11, 2024
Adds an ability to kill clients older than a specified age. Also, fixed the age calculation in `catClientInfoString` to use `commandTimeSnapshot` instead of the old `server.unixtime`, and added missing documentation for `CLIENT KILL ID` to output of `CLIENT help`. --------- Co-authored-by: Oran Agra <[email protected]>
enjoy-binbin
added a commit
to enjoy-binbin/redis
that referenced
this pull request
Feb 11, 2024
This test fails occasionally:
```
*** [err]: CLIENT KILL maxAGE will kill old clients in tests/unit/introspection.tcl
Expected 2 == 1 (context: type eval line 14 cmd {assert {$res == 1}} proc ::test)
```
This test is very likely to do a false positive if the execute time
takes longer than the max age, for example, if the execution time
between sleep and kill exceeds 1s, rd2 will also be killed due to
the max age.
The test can adjust the order of execution statements to increase
the probability of passing, but this is still will be a timing issue
in some slow machines, so decided give it a few more chances.
The test was introduced in redis#12299.
oranagra
pushed a commit
that referenced
this pull request
Feb 12, 2024
This test fails occasionally:
```
*** [err]: CLIENT KILL maxAGE will kill old clients in tests/unit/introspection.tcl
Expected 2 == 1 (context: type eval line 14 cmd {assert {$res == 1}} proc ::test)
```
This test is very likely to do a false positive if the execute time
takes longer than the max age, for example, if the execution time
between sleep and kill exceeds 1s, rd2 will also be killed due to
the max age.
The test can adjust the order of execution statements to increase
the probability of passing, but this is still will be a timing issue
in some slow machines, so decided give it a few more chances.
The test was introduced in #12299.
This was referenced Feb 20, 2024
Closed
Closed
This was referenced Feb 20, 2024
Closed
Closed
funny-dog
pushed a commit
to funny-dog/redis
that referenced
this pull request
Sep 17, 2025
Adds an ability to kill clients older than a specified age. Also, fixed the age calculation in `catClientInfoString` to use `commandTimeSnapshot` instead of the old `server.unixtime`, and added missing documentation for `CLIENT KILL ID` to output of `CLIENT help`. --------- Co-authored-by: Oran Agra <[email protected]>
funny-dog
pushed a commit
to funny-dog/redis
that referenced
this pull request
Sep 17, 2025
This test fails occasionally:
```
*** [err]: CLIENT KILL maxAGE will kill old clients in tests/unit/introspection.tcl
Expected 2 == 1 (context: type eval line 14 cmd {assert {$res == 1}} proc ::test)
```
This test is very likely to do a false positive if the execute time
takes longer than the max age, for example, if the execution time
between sleep and kill exceeds 1s, rd2 will also be killed due to
the max age.
The test can adjust the order of execution statements to increase
the probability of passing, but this is still will be a timing issue
in some slow machines, so decided give it a few more chances.
The test was introduced in redis#12299.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an ability to kill clients older than a specified age.
Also, fixed the age calculation in
catClientInfoStringto usecommandTimeSnapshotinstead of the old
server.unixtime, and added missing documentation forCLIENT KILL IDto output ofCLIENT help.