private void tryReadAhead() {
            if (readAheadQueue.size() < readAheadObjectSize && nextIndex < objectList.size()) {
                RecordAccumulator.WALObject object = objectList.get(nextIndex++);
                ObjectStorage.ReadOptions options = new ObjectStorage.ReadOptions().throttleStrategy(ThrottleStrategy.BYPASS).bucket(object.bucketId());
                CompletableFuture<byte[]> readFuture = objectStorage.rangeRead(options, object.path(), 0, object.length())
                    .thenApply(buffer -> {
                        // Copy the result buffer and release it.
                        byte[] bytes = new byte[buffer.readableBytes()];
                        buffer.readBytes(bytes);
                        buffer.release();
                        return bytes;
                    });
                readAheadQueue.add(readFuture);
            }
        }
Get the latest trim offset from the newest object.
s3stream/src/main/java/com/automq/stream/s3/wal/impl/object/ObjectWALService.java