Skip to content

Extend freeSlotsToKeysMapAsync and freeTrackingRadixTreeAsync to check LAZYFREE_THRESHOLD.#8969

Merged
oranagra merged 2 commits intoredis:unstablefrom
enjoy-binbin:extend_check_lazyfree_threshold
May 30, 2021
Merged

Extend freeSlotsToKeysMapAsync and freeTrackingRadixTreeAsync to check LAZYFREE_THRESHOLD.#8969
oranagra merged 2 commits intoredis:unstablefrom
enjoy-binbin:extend_check_lazyfree_threshold

Conversation

@enjoy-binbin
Copy link
Copy Markdown
Contributor

@enjoy-binbin enjoy-binbin commented May 20, 2021

Without this fix, FLUSHALL ASYNC would have freed these in a background thread,
even if they didn't contain many elements (unlike how it works with other structures), which could be inefficient.
see some considerations #8258 (comment)

@enjoy-binbin enjoy-binbin changed the title Extend freeSlotsToKeysMapAsync and freeTrackingRadixTreeAsync to chec… Extend freeSlotsToKeysMapAsync and freeTrackingRadixTreeAsync to check LAZYFREE_THRESHOLD. May 20, 2021
oranagra
oranagra previously approved these changes May 20, 2021
Copy link
Copy Markdown
Member

@oranagra oranagra left a comment

Choose a reason for hiding this comment

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

LGTM.
maybe we can add some comment saying why we use numnodes and not numele (i.e. because this rax has only keys, and no values.

also, maybe we wanna use this opportunity to fix the stats, but i'm not sure if 1 numnodes or numele is better, so waiting to hear more feedback before i merge.

@madolson maybe you'll have an opinion. see some considerations here

@oranagra oranagra added the 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 label May 20, 2021
@enjoy-binbin enjoy-binbin force-pushed the extend_check_lazyfree_threshold branch from e963e07 to c6a6e23 Compare May 20, 2021 10:26
@oranagra oranagra merged commit 01495c6 into redis:unstable May 30, 2021
@enjoy-binbin enjoy-binbin deleted the extend_check_lazyfree_threshold branch May 30, 2021 15:01
JackieXie168 pushed a commit to JackieXie168/redis that referenced this pull request Sep 8, 2021
…k LAZYFREE_THRESHOLD. (redis#8969)

Without this fix, FLUSHALL ASYNC would have freed these in a background thread,
even if they didn't contain many elements (unlike how it works with other structures), which could be inefficient.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

None yet

Development

Successfully merging this pull request may close these issues.

2 participants