dice icon indicating copy to clipboard operation
dice copied to clipboard

Optimize DBSIZE command to not require lock on keypool

Open JyotinderSingh opened this issue 1 year ago • 2 comments

DBSIZE store API currently takes a lock on the keypool to evaluate the number of keys in the database. Instead we can simply return the value stored in KeyspaceStat data structure which already counts the number of keys.

Additionally there is likely to be much lesser contention on this data structure as compared to the keypool, which will help with performance.

JyotinderSingh avatar Aug 19 '24 08:08 JyotinderSingh

@JyotinderSingh Assign it to me.

raknay avatar Aug 19 '24 08:08 raknay

@JyotinderSingh Assign it to me.

Assigned.

JyotinderSingh avatar Aug 19 '24 08:08 JyotinderSingh