PAHMA-964: Retry batches when they fail.