Skip to content

Modify mem_usage2 module callback to enable to take sample_size argument#9612

Merged
oranagra merged 4 commits intoredis:unstablefrom
fadidahanna:mem_usage_for_complex_module_type
Oct 17, 2021
Merged

Modify mem_usage2 module callback to enable to take sample_size argument#9612
oranagra merged 4 commits intoredis:unstablefrom
fadidahanna:mem_usage_for_complex_module_type

Conversation

@fadidahanna
Copy link
Contributor

@fadidahanna fadidahanna commented Oct 7, 2021

This is useful for approximating size computation of complex module types.
Note that the mem_usage2 callback is new and has not been released yet, which is why we can modify it.

…f complex module types

Adding `sample_size` arg to enable module to compute approximately key size based on `sample_size` sampled nested values only.
Existing mem_usage2 api can be changed, due to the fact that it was introduced lately in e0cd3ad, but was not released yet.
@fadidahanna fadidahanna force-pushed the mem_usage_for_complex_module_type branch from 5d6d9e5 to 407d26a Compare October 7, 2021 14:05
@oranagra oranagra changed the title Modify mem_usage callback to enable approximating size computation of complex module types Modify mem_usage2 module callback to enable to take sample_size argument Oct 10, 2021
@oranagra oranagra added state:to-be-merged The PR should be merged soon, even if not yet ready, this is used so that it won't be forgotten approval-needed Waiting for core team approval to be merged release-notes indication that this issue needs to be mentioned in the release notes state:major-decision Requires core team consensus labels Oct 10, 2021
@oranagra
Copy link
Member

@redis/core-team please approve an additional argument to a new module callback not yet released.

@itamarhaber
Copy link
Member

Fixes #4177

Copy link
Contributor

@madolson madolson left a comment

Choose a reason for hiding this comment

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

LGTM

@oranagra oranagra merged commit 61bb044 into redis:unstable Oct 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval-needed Waiting for core team approval to be merged release-notes indication that this issue needs to be mentioned in the release notes state:major-decision Requires core team consensus state:to-be-merged The PR should be merged soon, even if not yet ready, this is used so that it won't be forgotten

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[MODULES API] RedisModuleTypeMemUsageFunc should accept a samples argument

5 participants