modify commit logic because commit is highly-cost operation.