Skip to content

Instantly share code, notes, and snippets.

View Arkatufus's full-sized avatar

Gregorius Soedharmo Arkatufus

  • Petabridge
  • Bandung, Indonesia
View GitHub Profile
using System;
using System.Threading.Tasks;
using System.Threading;
using Akka.Configuration;
using Akka.TestKit;
using Xunit;
using Xunit.Abstractions;
using System;
using System.Collections.Immutable;
using System.Threading.Tasks;
using System.Threading;
using Akka.Actor;
using Akka.Configuration;
using Akka.TestKit;
using Xunit;
@Arkatufus
Arkatufus / report.md
Last active August 4, 2020 05:56
Batching SQL persistence bug report

Hunches

  • BatchingSqlJournal expects a Terminated message to properly dispose of itself, but it never receives any.
    • Related to akkadotnet/Akka.Persistence.SqlServer#114 (comment) "the number of recovering actors are more that 3500!" (strong possible clue)
    • Possible fix: add Context.Watch(Self); to the constructor
    • Context.Watch(Self) is called in AddTagSubscriber and AddAllSubscriber, need further investigation.
  • A combination of BatchingSqlJournal and sharding supervising is causing the system to recreate failing actors way too frequently, spamming the system with "CircuitBreaker is failing fast" debug message.
    • Have not checked the sharding code yet, still a hypothesis.
@Arkatufus
Arkatufus / ClusterListener.cs
Created July 16, 2021 14:36
Attempt to create a network environment with
using Akka.Actor;
using Akka.Cluster;
using Akka.Event;
namespace Simple.Cluster
{
public class ClusterListener : ReceiveActor
{
public static Props Props() => Akka.Actor.Props.Create(() => new ClusterListener());
public interface IMyInterface
{
TOut MyMethod<TOut>(object message);
}
public interface IMyInterface<TIn> : IMyInterface
{
TOut MyMethod<TOut>(TIn message);
}