Skip to content

Akka.Persistence: Akka.Persistence.Journal.AsyncWriteJournal+Resequencer is created as a top-level /user actor instead of a child of the journal #7480

@Aaronontheweb

Description

@Aaronontheweb

Version Information
Version of Akka.NET? v1.5.36 and earlier
Which Akka.NET Modules? Akka.Peristence and all implementations

Describe the bug

While reviewing some of the work we've been doing to help keep Phobos metrics clean, @object observed a massive number of Akka.Persistence.Journal.AsyncWriteJournal+Resequencer running around under the /user actor hierarchy according to Phobos metrics: petabridge/phobos-issues#86 (comment)

As it turns out, this is indeed a bug - the Resequencer is being created in the wrong place:

_resequencer = Context.System.ActorOf(Props.Create(() => new Resequencer()));

Now as for why there's such a large number of them, two theories:

  1. This actor is getting abused by plugin implementations that create Resequencers on-demand and never terminate them
  2. The journal actor is restarting frequently and due to this bug, the old Resequencers are never terminated.

Expected behavior

The journal should only need a single Resequencer and it should be the journal's child.

Actual behavior

YOLO

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions