changed hot index lock release to use RAII #1035