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=034f6b9c9598877df608450445969525d8336d63;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; } }