https://github.com/antirez/redis/blob/c2db3de49859a43a0685885f4f73d7ee0000728e/src/dict.c#L1047
Since d->ht[0].used + d->ht[1].used has been defined in dict.h as #define dictSize(d) ((d)->ht[0].used+(d)->ht[1].used)
So it can replace by dictSize(d)
Comment From: ShooterIT
I think you could submit a PR.
Comment From: hwware
the dictSize was fixed in https://github.com/redis/redis/pull/7252, but in addition to that, we can also use predefined dictSlots for gettinng total number of dict slots.. since a PR has been proposed(https://github.com/redis/redis/pull/7691), recommend to close this issue @oranagra @itamarhaber @madolson
Comment From: oranagra
side notes: i'm not sure the right thing to do is close an issue as soon as there is a PR. I think issues should remain open until they're no longer "an issue". what can be done is to link the PR to the issue, so that when it is merged, the issue is automatically cloesd.
we should attempt to close duplicate issues though.. in order to encourage all communication about a certain subject to focus in one place.
however this issue is related to #7252 (already merged), not to #7691, right? so it can indeed be closed.
Comment From: hwware
@oranagra thanks Oran, yep I think for big issues we should wait for PR merged/tested make sure no problem happens again and then close the issue. and you are right this is related to #7252, #7691 is just an extension for this normalization work :)