docs: private final void updateShardInfo() {
      final long expirationTime = 1000;
      // don't update too much
      if (shardKey == null || (shardInfoUpdated
          && Objects.requireNonNull(shardInfoUpdate, "update expire time not set") < System.currentTimeMillis())) {
        return;
      }
      // and only if necessary
      if (!shardInfoUpdated || !finished || shardInfoNeedUpdate) {
        // reset
        shardInfoError = false;
        // get list of relevant stages
        Set<Integer> stagesList = new HashSet<>();
        for (Integer stage : shardStageKeys.keySet()) {
          if (!shardStageStatus.containsKey(stage) || !shardStageStatus.get(stage).finished) {
            stagesList.add(stage);
          }
        }
        // loop for this list over shards
        for (Entry<String, ShardStatus> entry : shards.entrySet()) {
          ShardStatus shardStatus = entry.getValue();
          SolrClient solrClient = null;
          StageStatus stageStatus;
          // then loop over stages
          for (Integer stage : stagesList) {
            // get shardStage
            if (!shardStageStatus.containsKey(stage)) {
              stageStatus = new StageStatus(stage);
              shardStageStatus.put(stage, stageStatus);
            } else {
              stageStatus = shardStageStatus.get(stage);
            }
            if (shardStatus.finishedStages.contains(stage)) {
              stageStatus.add(true, shardStatus.numberDocumentsFoundStage.get(stage));
            } else {
              // create request
              ModifiableSolrParams solrParams = new ModifiableSolrParams();
              solrParams.add(CommonParams.QT, shardStatus.mtasHandler);
              solrParams.add(MtasRequestHandler.PARAM_ACTION, MtasRequestHandler.ACTION_STATUS);
              solrParams.add(MtasRequestHandler.PARAM_KEY, shardStageKeys.get(stage));
  
              try {
                // set solrClient
                solrClient = new HttpSolrClient.Builder(shardStatus.location).build();
                // get response
                QueryResponse response = solrClient.query(solrParams);
                // check for response
                if (response.getResponse().findRecursive(MtasSolrComponentStatus.NAME) != null) {
                  shardStatus.numberDocumentsFoundStage.put(stage,
                      getLong(response.getResponse(), MtasSolrComponentStatus.NAME, NAME_STATUS_DOCUMENT_NUMBER_FOUND));
                  shardStatus.timeStage.put(stage,
                      getInteger(response.getResponse(), MtasSolrComponentStatus.NAME, NAME_TIME_TOTAL));
                  stageStatus.add(
                      shardStatus.setFinishedStage(stage,
                          getBoolean(response.getResponse(), MtasSolrComponentStatus.NAME, NAME_FINISHED)),
                      shardStatus.numberDocumentsFoundStage.get(stage));
                  shardInfoError = shardStatus.setErrorStage(stage,
                      getString(response.getResponse(), MtasSolrComponentStatus.NAME, NAME_ERROR)) || shardInfoError;
                  shardStatus.setAbortStage(stage,
                      getString(response.getResponse(), MtasSolrComponentStatus.NAME, NAME_ABORT));
                  if (stage.equals(currentStage)) {
                    shardStatus.stage = stage;
                    shardStatus.stageNumberDocumentsFinished = getLong(response.getResponse(),
                        MtasSolrComponentStatus.NAME, NAME_STATUS_DOCUMENT_NUMBER_FINISHED);
                    shardStatus.stageSubNumberDocumentsFinished = getLongMap(response.getResponse(),
                        MtasSolrComponentStatus.NAME, NAME_STATUS_DOCUMENT_SUB_NUMBER_FINISHED);
                    shardStatus.stageSubNumberDocumentsTotal = getLong(response.getResponse(),
                        MtasSolrComponentStatus.NAME, NAME_STATUS_DOCUMENT_SUB_NUMBER_TOTAL);
                    shardStatus.stageSubNumberDocumentsFinishedTotal = getLong(response.getResponse(),
                        MtasSolrComponentStatus.NAME, NAME_STATUS_DOCUMENT_SUB_NUMBER_FINISHED_TOTAL);
                    shardStatus.stageNumberSegmentsFinished = getInteger(response.getResponse(),
                        MtasSolrComponentStatus.NAME, NAME_STATUS_SEGMENT_SUB_NUMBER_FINISHED_TOTAL);
                    shardStatus.stageSubNumberSegmentsFinished = getIntegerMap(response.getResponse(),
                        MtasSolrComponentStatus.NAME, NAME_STATUS_SEGMENT_SUB_NUMBER_FINISHED);
                    shardStatus.stageSubNumberSegmentsTotal = getInteger(response.getResponse(),
                        MtasSolrComponentStatus.NAME, NAME_STATUS_SEGMENT_SUB_NUMBER_TOTAL);
                    shardStatus.stageSubNumberSegmentsFinishedTotal = getInteger(response.getResponse(),
                        MtasSolrComponentStatus.NAME, NAME_STATUS_SEGMENT_SUB_NUMBER_FINISHED_TOTAL);
                  }
                } else if (!finished && currentStage.equals(stage) && !stageStatus.checked) {
                  stageStatus.finished = false;
                }
              } catch (SolrServerException | IOException e) {
                shardInfoError = shardInfoError || shardStatus.setErrorStage(stage, e.getMessage());
              } finally {
                if (solrClient != null) {
                  try {
                    solrClient.close();
                  } catch (IOException e) {
                    shardInfoError = shardInfoError || shardStatus.setErrorStage(stage, e.getMessage());
                  }
                }
              }
            }
          }
        }
        if (!shardInfoError) {
          for (StageStatus item : shardStageStatus.values()) {
            item.checked = true;
          }
          shardInfoUpdated = true;
          shardInfoUpdate = System.currentTimeMillis() + expirationTime;
        } else {
          shardInfoUpdated = false;
          shardInfoUpdate = null;
        }
      }
    }