fix infinite loop by randomkey if the slave only has expired key.
 - count retry and return key if it reach dbSize