protected void setFailure(Throwable throwable) {
        if (failure == null) {
            this.failure = throwable;
        }
    }
Copied from iceberg 1.1.x. Modify List to concurrent List.
@param <T>
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/iceberg/src/main/java/org/apache/inlong/sort/iceberg/sink/trick/BaseTaskWriter.java