code: boolean segmentExists(long txid) throws IOException {
      List<RemoteEditLog> segments = getManifest();
      for (RemoteEditLog segment : segments) {
        if (segment.getStartTxId() == txid) {
          return true;
        }
      }
      return false;
    }
docs: Check if a segment of a given txid exists in the underlying storage
  directory. Whne the reader cannot read any new data, it will
  periodically check if there was some unclean shutdown, which results in
  an unfinalized log.