public static boolean needRetryHelper(TSStatus status) {
    int code = status.getCode();
    if (code == TSStatusCode.MULTIPLE_ERROR.getStatusCode()) {
      for (TSStatus subStatus : status.subStatus) {
        // any sub codes for MULTIPLE_ERROR don't need to retry, we won't retry for the whole
        // request
        if (subStatus == null
            || (subStatus.getCode() != OK.code
                && !needRetryHelperForSingleStatus(subStatus.getCode()))) {
          return false;
        }
      }
      return true;
    } else {
      return needRetryHelperForSingleStatus(code);
    }
  }
@param statusMap index -> status
@param size the total number of status to generate
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/StatusUtils.java