Skip to content

Conversation

@oranagra
Copy link
Member

@oranagra oranagra commented Jan 4, 2023

PR #11290 added listpack encoding for sets, but was missing two things:

  1. Correct handling of MEMORY USAGE (leading to an assertion).
  2. Had an uncontrolled scratch buffer size in SRANDMEMBER leading to OOM panic (reported in [CRASH] OOM Crash for srandmember #11668). Fixed by copying logic from ZRANDMEMBER.

note that both issues didn't exist in any redis release.

The case of SRANDMEMBER in #11668 will now result in a hung likes in #11671 (instead of OOM panic), to be discussed in #11671

Both issues reported by @yype

@oranagra oranagra linked an issue Jan 4, 2023 that may be closed by this pull request
PR #11290 added listpack encoding for sets, but was missing two things:
1. Correct handling of MEMORY USAGE (leading to an assertion).
2. Had an uncontrolled scratch buffer size in SRANDMEMBER leading to
   OOM panic (reported in #11668). Fixed by copying logic from ZRANDMEMBER.

note that both issues didn't exist in any redis release.
Copy link
Contributor

@zuiderkwast zuiderkwast left a comment

Choose a reason for hiding this comment

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

Thanks for fixing. Sorry that this feature has caused so many problems.

note that both issues didn't exist in any redis release.

Fortunately!

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.

Makes sense to me.

@oranagra oranagra merged commit d0cc3de into redis:unstable Jan 5, 2023
@oranagra oranagra deleted the fix_lp_sets branch January 5, 2023 06:22
enjoy-binbin pushed a commit to enjoy-binbin/redis that referenced this pull request Jul 31, 2023
PR redis#11290 added listpack encoding for sets, but was missing two things:
1. Correct handling of MEMORY USAGE (leading to an assertion).
2. Had an uncontrolled scratch buffer size in SRANDMEMBER leading to
   OOM panic (reported in redis#11668). Fixed by copying logic from ZRANDMEMBER.

note that both issues didn't exist in any redis release.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[CRASH] OOM Crash for srandmember

4 participants