void cleanUpJournal() {
    if (!inBootstrapMode) {
      journal.clear();
      recentCrcs.clear();
      currentNumberOfEntries.set(0);
    }
  }
This method should only be called when replica gets sealed. Remove all entries belongs to the auto closed log segment.
It will delay the addEntry method for sealed replica, so the replication performance will be hold while running this method.
ambry-store/src/main/java/com/github/ambry/store/Journal.java