use better locking solution to prevent bucket reads overlapping with writes