From 034f6b9c9598877df608450445969525d8336d63 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Tue, 5 Mar 2024 17:50:47 +0100 Subject: [PATCH] fix: Detection of the `READY`-state for `InfoChannel` was flawed --- .../kafka/chat/backend/implementation/kafka/InfoChannel.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/InfoChannel.java b/src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/InfoChannel.java index 7665faea..95f7fb06 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/InfoChannel.java +++ b/src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/InfoChannel.java @@ -225,9 +225,10 @@ public class InfoChannel implements Channel { boolean loadInProgress = IntStream .range(0, numShards) - .anyMatch(shard -> this.nextOffset[shard] < currentOffset[partition]); + .anyMatch(shard -> this.nextOffset[shard] < currentOffset[shard]); if (!loadInProgress) { + log.info("Loading of info completed! Resuming normal operations..."); channelState = ChannelState.READY; } } -- 2.20.1