hash entry key before usage; fix getpartitionrange on the last partition