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

Add FUNCTION STATS command. #333

Merged
merged 4 commits into from
Jun 13, 2024

Conversation

Yury-Fridlyand
Copy link

@Yury-Fridlyand Yury-Fridlyand commented May 31, 2024

Depends and based on #333 on #328

Note: IT is incomplete, because FUNCTION KILL tests don't work

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
@Yury-Fridlyand Yury-Fridlyand marked this pull request as ready for review June 1, 2024 03:59
ExpectedReturnType::FunctionStatsReturnType => match value {
// TODO reuse https://github.com/Bit-Quill/glide-for-redis/pull/331 and https://github.com/aws/glide-for-redis/pull/1489
Value::Map(map) => {
if map[0].0 == Value::BulkString(b"running_script".into()) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to check that the map isn't empty before indexing into it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line checks that first key in the map is "running_script". The value for that key could be empty, but I don't touch it there.
FUNCTION STATS should never return empty reponse/array/map.

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
@Yury-Fridlyand Yury-Fridlyand merged commit 783942b into java/integ_yuryf_fstats Jun 13, 2024
38 of 44 checks passed
@Yury-Fridlyand Yury-Fridlyand deleted the java/dev_yuryf_fstats branch June 13, 2024 00:07
Yury-Fridlyand added a commit that referenced this pull request Jun 13, 2024
* Add `FUNCTION STATS` command.

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>

* Complete `FUNCTION STATS` implementation.

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>

* Minor rust code grooming.

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>

* Address PR comments.

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>

---------

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Yury-Fridlyand added a commit that referenced this pull request Jun 14, 2024
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Yury-Fridlyand added a commit that referenced this pull request Jun 14, 2024
Add `FUNCTION STATS` command. (#333)

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
cyip10 pushed a commit that referenced this pull request Jun 24, 2024
Add `FUNCTION STATS` command. (#333)

Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants