Skip to content

Commit

Permalink
extend logging;
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Maute <stefan.maute@bosch.io>
  • Loading branch information
Stefan Maute committed Sep 26, 2022
1 parent f872b24 commit b964079
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ public abstract class AbstractPersistenceOperationsActor extends AbstractActor {
*/
private static final Duration SHUTDOWN_ASK_TIMEOUT = Duration.ofMinutes(2L);

private static final Throwable KILL_SWITCH_EXCEPTION = new IllegalStateException();
private static final Throwable KILL_SWITCH_EXCEPTION =
new IllegalStateException("Aborting persistence operations stream because of graceful shutdown.");

private final ActorRef pubSubMediator;
private final EntityType entityType;
Expand Down Expand Up @@ -395,7 +396,8 @@ private void opComplete(final OpComplete opComplete) {
}

private void serviceRequestsDone(final Control serviceRequestsDone) {
logger.info("Re-schedule/Publish {} commands via PubSub.", lastCommandsAndSender.size());
logger.info("Re-schedule/Publish <{}> commands for <{}> via PubSub.", lastCommandsAndSender.size(),
getActorName());
killSwitch.abort(KILL_SWITCH_EXCEPTION);
lastCommandsAndSender.forEach((command, sender) -> {
if (command instanceof PurgeNamespace purgeNamespace) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public final class PersistenceCleanupActor extends AbstractFSM<PersistenceCleanu
private static final Duration SHUTDOWN_ASK_TIMEOUT = Duration.ofMinutes(2L);

private static final Throwable KILL_SWITCH_EXCEPTION =
new IllegalStateException("Aborting stream because of graceful shutdown.");
new IllegalStateException("Aborting persistence clean up stream because of graceful shutdown.");

private final ThreadSafeDittoLoggingAdapter logger = DittoLoggerFactory.getThreadSafeDittoLoggingAdapter(this);
private final Materializer materializer = Materializer.createMaterializer(getContext());
Expand Down

0 comments on commit b964079

Please sign in to comment.