Fix crash unlinking a stream with groups rax and no groups (#8932)
When estimating the effort for unlink, we try to compute the effort of the first group and extrapolate. If there's a groups rax that's empty, there'a an assertion. reproduce: xadd s * a b xgroup create s bla $ xgroup destroy s bla unlink s
This commit is contained in:
parent
fb66c1b58c
commit
97108845e2
@ -109,7 +109,7 @@ size_t lazyfreeGetFreeEffort(robj *key, robj *obj) {
|
||||
/* Every consumer group is an allocation and so are the entries in its
|
||||
* PEL. We use size of the first group's PEL as an estimate for all
|
||||
* others. */
|
||||
if (s->cgroups) {
|
||||
if (s->cgroups && raxSize(s->cgroups)) {
|
||||
raxIterator ri;
|
||||
streamCG *cg;
|
||||
raxStart(&ri,s->cgroups);
|
||||
|
Loading…
x
Reference in New Issue
Block a user