@Override
  public void updateTtl(List<MessageInfo> infos) throws StoreException {
    List<MessageInfo> infosToUpdate = new ArrayList<>(infos.size());
    List<InputStream> inputStreams = new ArrayList<>();
    try {
      for (MessageInfo info : infos) {
        if (info.getExpirationTimeInMs() != Utils.Infinite_Time) {
          throw new StoreException("BlobStore only supports removing the expiration time",
              StoreErrorCodes.UpdateNotAllowed);
        }
        MessageInfo latestInfo = getMergedMessageInfo(info.getStoreKey(), messageInfos);
        if (latestInfo == null) {
          throw new StoreException("Cannot update TTL of " + info.getStoreKey() + " since it's not in the index",
              StoreErrorCodes.IDNotFound);
        } else if (latestInfo.isDeleted()) {
          throw new StoreException(
              "Cannot update TTL of " + info.getStoreKey() + " since it is already deleted in the index.",
              StoreErrorCodes.IDDeleted);
        } else if (latestInfo.isTtlUpdated()) {
          throw new StoreException("TTL of " + info.getStoreKey() + " is already updated in the index.",
              StoreErrorCodes.AlreadyUpdated);
        }
        short lifeVersion = latestInfo.getLifeVersion();
        MessageFormatInputStream stream =
            new TtlUpdateMessageFormatInputStream(info.getStoreKey(), info.getAccountId(), info.getContainerId(),
                info.getExpirationTimeInMs(), info.getOperationTimeMs(), lifeVersion);
        infosToUpdate.add(
            new MessageInfo(info.getStoreKey(), stream.getSize(), false, true, false, info.getExpirationTimeInMs(),
                null, info.getAccountId(), info.getContainerId(), info.getOperationTimeMs(), lifeVersion));
        inputStreams.add(stream);
      }
      MessageFormatWriteSet writeSet =
          new MessageFormatWriteSet(new SequenceInputStream(Collections.enumeration(inputStreams)), infosToUpdate,
              false);
      writeSet.writeTo(log);
      messageInfos.addAll(infosToUpdate);
    } catch (Exception e) {
      throw (e instanceof StoreException ? (StoreException) e : new StoreException(e, StoreErrorCodes.UnknownError));
    }
  }
Log that stores all data in memory.
ambry-replication/src/test/java/com/github/ambry/replication/InMemoryStore.java