public boolean nonEmpty() {
        lock.readLock().lock();
        try {
            return !epochs.isEmpty();
        } finally {
            lock.readLock().unlock();
        }
    }
Remove any entries which violate monotonicity prior to appending a new entry
storage/src/main/java/org/apache/kafka/storage/internals/epoch/LeaderEpochFileCache.java