fix(store): synchronize access to CurrentIndex
Merge pull request #804 from xiangli-cmu/fix_curr_index_race

fix(store): synchronize access to CurrentIndex