synchronized void add(StreamRecordBatch recordBatch) {
            if (recordBatch.getBaseOffset() != endOffset && endOffset != NOOP_OFFSET) {
                RuntimeException ex = new IllegalArgumentException(String.format("streamId=%s record batch base offset mismatch, expect %s, actual %s",
                    recordBatch.getStreamId(), endOffset, recordBatch.getBaseOffset()));
                LOGGER.error("[FATAL]", ex);
            }
            records.add(recordBatch);
            if (startOffset == NOOP_OFFSET) {
                startOffset = recordBatch.getBaseOffset();
            }
            endOffset = recordBatch.getLastOffset();
        }
Merge the right block to the left block
s3stream/src/main/java/com/automq/stream/s3/cache/LogCache.java