tailrec transaction retry