Skip to content

Commit e4d6263

Browse files
Merge pull request #95 from rabbitmq/avoid-stack-trace-logging-on-replica-reader-shutdown
Use normal exit reason on replica reader shutdown
2 parents 4e32be4 + 0476867 commit e4d6263

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

WORKSPACE.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ filegroup(
8282
visibility = ["//visibility:public"],
8383
)
8484
""",
85-
sha256 = "cac7afd62f347f575141db3394ff04c9742a6f63b943ad9fc088280d2b751d6a",
85+
sha256 = "2cda9a35cf20f4d1307ad807c76aca0cb961bfe497bb349f739f93be88bcb425",
8686
strip_prefix = "tls-gen-main",
87-
urls = ["https://github.com/michaelklishin/tls-gen/archive/refs/heads/main.zip"],
87+
urls = ["https://github.com/rabbitmq/tls-gen/archive/refs/heads/main.zip"],
8888
)

src/osiris_replica.erl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,15 @@ handle_info({'DOWN', _Ref, process, Pid, Info},
478478
?DEBUG_(Name, "DOWN received for Pid ~w, Info: ~w",
479479
[Pid, Info]),
480480
{noreply, State};
481+
handle_info({'EXIT', RRPid, shutdown = Info},
482+
#?MODULE{cfg = #cfg{name = Name,
483+
replica_reader_pid = RRPid}} = State) ->
484+
%% any replica reader exit is troublesome and requires the replica to also
485+
%% terminate
486+
?INFO_(Name, "replica reader ~w exited with ~w", [RRPid, Info]),
487+
%% the replica reader shut down normally, so we use the normal return code
488+
%% to avoid logging the whole stack trace
489+
{stop, normal, State};
481490
handle_info({'EXIT', RRPid, Info},
482491
#?MODULE{cfg = #cfg{name = Name,
483492
replica_reader_pid = RRPid}} = State) ->

0 commit comments

Comments
 (0)