move recover inside closure for skipping redis write on slave