Add retry feature for insert and update operations.