private void trimStream(Map<String, Long> trimOffsets) {
        try {
            trimStream0(trimOffsets);
        } catch (Throwable e) {
            LOGGER.error("{} trim stream failed", logIdent, e);
        }
    }
The lock of {@link #segments} and {@link #inflightCleanedSegments}
core/src/main/scala/kafka/log/streamaspect/ElasticLogSegmentManager.java