@Override
  public String getSnapshotId(List<LogInfo> logSegments) {
    StringBuilder sb = new StringBuilder();

    for (LogInfo logInfo : logSegments) {
      sb.append(logInfo.getLogSegment().getFileName());
      for (FileInfo indexSegment : logInfo.getIndexSegments()) {
        sb.append(indexSegment.getFileName());
      }
    }
    try {
      MessageDigest digest = MessageDigest.getInstance("SHA-256");
      byte[] hash = digest.digest(sb.toString().getBytes(StandardCharsets.UTF_8));
      return Utils.encodeAsHexString(hash);
    } catch (NoSuchAlgorithmException e) {
      throw new RuntimeException("SHA-256 algorithm not found", e);
    }
  }
Resumes a compaction if one is in progress.
@throws StoreException if there are any errors during the compaction.
@param bundleReadBuffer the preAllocated buffer for bundle read in compaction copy phase.
ambry-store/src/main/java/com/github/ambry/store/BlobStore.java