private void loadNextBuffer(boolean skipStickyRecord) {
            // Please call hasNext() before calling loadNextBuffer().
            byte[] buffer = Objects.requireNonNull(readAheadQueue.poll()).join();
            dataBuffer = Unpooled.wrappedBuffer(buffer);

            // Check header
            WALObjectHeader header = WALObjectHeader.unmarshal(dataBuffer);
            dataBuffer.skipBytes(header.size());

            if (skipStickyRecord && header.stickyRecordLength() != 0) {
                dataBuffer.skipBytes((int) header.stickyRecordLength());
            }
        }
Get the latest trim offset from the newest object.
s3stream/src/main/java/com/automq/stream/s3/wal/impl/object/ObjectWALService.java