WIP rebase--2023-09-02--10-22
authorKai Moritz <kai@juplo.de>
Sat, 2 Sep 2023 08:09:53 +0000 (10:09 +0200)
committerKai Moritz <kai@juplo.de>
Sat, 2 Sep 2023 08:09:53 +0000 (10:09 +0200)
src/main/java/de/juplo/kafka/chat/backend/domain/LoadInProgressException.java
src/main/java/de/juplo/kafka/chat/backend/persistence/kafka/ChatRoomChannel.java
src/main/java/de/juplo/kafka/chat/backend/persistence/kafka/KafkaChatHome.java
src/test/resources/application.yml

index 4592502..d87e76d 100644 (file)
@@ -1,15 +1,10 @@
 package de.juplo.kafka.chat.backend.domain;
 
 
-import java.util.concurrent.atomic.AtomicInteger;
-
-
 public class LoadInProgressException extends IllegalStateException
 {
-  static AtomicInteger counter = new AtomicInteger();
-
   public LoadInProgressException()
   {
-    super("Load in progress... " + counter.incrementAndGet());
+    super("Load in progress...");
   }
 }
index ad9531c..234554e 100644 (file)
@@ -369,13 +369,11 @@ public class ChatRoomChannel implements Runnable, ConsumerRebalanceListener
   {
     if (loadInProgress)
     {
-      log.error("Load in progress!");
       return Mono.error(new LoadInProgressException());
     }
 
     if (!isShardOwned[shard])
     {
-      log.error("Shard {} for chat-room {} not owned!", shard, id);
       return Mono.error(new ShardNotOwnedException(shard));
     }
 
index 2788343..07fb885 100644 (file)
@@ -26,13 +26,10 @@ public class KafkaChatHome implements ChatHome
     int shard = selectShard(id);
     return chatRoomChannel
         .getChatRoom(shard, id)
-        .switchIfEmpty(Mono.error(() -> {
-          log.error("Unknown chat-room {} (shard={})!", id, shard);
-          return new UnknownChatroomException(
-              id,
-              shard,
-              chatRoomChannel.getOwnedShards());
-        }));
+        .switchIfEmpty(Mono.error(() -> new UnknownChatroomException(
+            id,
+            shard,
+            chatRoomChannel.getOwnedShards())));
   }
 
   int selectShard(UUID chatRoomId)
index 856b2e2..96b0cb3 100644 (file)
@@ -1,4 +1,4 @@
 logging:
   level:
     root: INFO
-    de.juplo.kafka.chat.backend: TRACE
+    de.juplo.kafka.chat.backend: DEBUG