erase commit logic