From 16330b4781265858344fea5a8931e506f3e9a667 Mon Sep 17 00:00:00 2001 From: Artem Ananev Date: Fri, 12 Apr 2024 14:31:04 -0700 Subject: [PATCH] Increased AsyncOutputStream shared queue size Signed-off-by: Artem Ananev --- .../merkle/synchronization/streams/AsyncOutputStream.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform-sdk/swirlds-common/src/main/java/com/swirlds/common/merkle/synchronization/streams/AsyncOutputStream.java b/platform-sdk/swirlds-common/src/main/java/com/swirlds/common/merkle/synchronization/streams/AsyncOutputStream.java index fa48a2c062d5..14b6beb031b1 100644 --- a/platform-sdk/swirlds-common/src/main/java/com/swirlds/common/merkle/synchronization/streams/AsyncOutputStream.java +++ b/platform-sdk/swirlds-common/src/main/java/com/swirlds/common/merkle/synchronization/streams/AsyncOutputStream.java @@ -119,7 +119,7 @@ public AsyncOutputStream( this.outputStream = Objects.requireNonNull(outputStream, "outputStream must not be null"); this.workGroup = Objects.requireNonNull(workGroup, "workGroup must not be null"); this.queueSize = config.asyncStreamBufferSize(); - this.streamQueue = new LinkedBlockingQueue<>(queueSize); + this.streamQueue = new LinkedBlockingQueue<>(queueSize * config.maxParallelSubtrees()); this.viewMessages = new HashMap<>(); this.alive = true; this.timeSinceLastFlush = new StopWatch();