From: Kai Moritz Date: Tue, 5 Mar 2024 16:50:47 +0000 (+0100) Subject: fix: Detection of the `READY`-state for `InfoChannel` was flawed X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=0ce812fed1993a0de3026f481ecaac9ee8c4cffa;p=demos%2Fkafka%2Fchat fix: Detection of the `READY`-state for `InfoChannel` was flawed --- 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; } }