Retry database operations to allow parallelism.