CompletableFuture<Void> uploadDeltaWAL(long streamId, boolean force) {
        synchronized (deltaWALCache) {
            deltaWALCache.setConfirmOffset(confirmOffsetCalculator.get());
            Optional<LogCache.LogCacheBlock> blockOpt = deltaWALCache.archiveCurrentBlockIfContains(streamId);
            if (blockOpt.isPresent()) {
                LogCache.LogCacheBlock logCacheBlock = blockOpt.get();
                DeltaWALUploadTaskContext context = new DeltaWALUploadTaskContext(logCacheBlock);
                context.objectManager = this.objectManager;
                context.force = force;
                return uploadDeltaWAL(context);
            } else {
                return CompletableFuture.completedFuture(null);
            }
        }
    }
Force upload stream WAL cache to S3. Use group upload to avoid generate too many S3 objects when broker shutdown.
{@code streamId} can be {@link LogCache#MATCH_ALL_STREAMS} to force upload all streams.
s3stream/src/main/java/com/automq/stream/s3/S3Storage.java