Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 07:27
    dependabot-preview[bot] labeled #3999
  • 07:27

    dependabot-preview[bot] on nuget

    Bump FluentAssertions from 4.14… (compare)

  • 07:27
    dependabot-preview[bot] opened #3999
  • Oct 20 17:25
    valdisz synchronize #3889
  • Oct 20 17:17
    valdisz synchronize #3889
  • Oct 20 15:44
    valdisz synchronize #3889
  • Oct 20 09:22
    ismaelhamed commented #3863
  • Oct 19 23:39
    valdisz synchronize #3889
  • Oct 19 23:08
    edvinasz commented #2947
  • Oct 19 13:36
    Aaronontheweb commented #3973
  • Oct 19 13:34
    dependabot-preview[bot] synchronize #3995
  • Oct 19 13:34

    dependabot-preview[bot] on nuget

    Bump BenchmarkDotNet from 0.10.… (compare)

  • Oct 19 13:34
    dependabot-preview[bot] edited #3995
  • Oct 19 13:34
    dependabot-preview[bot] synchronize #3993
  • Oct 19 13:34

    dependabot-preview[bot] on nuget

    Bump Google.Protobuf from 3.9.1… (compare)

  • Oct 19 13:34
    dependabot-preview[bot] synchronize #3991
  • Oct 19 13:34

    dependabot-preview[bot] on nuget

    Bump Microsoft.Extensions.Depen… (compare)

  • Oct 19 13:34
    dependabot-preview[bot] synchronize #3989
  • Oct 19 13:34

    dependabot-preview[bot] on nuget

    Bump ApiApprover from 3.0.1 to … (compare)

  • Oct 19 13:34
    dependabot-preview[bot] synchronize #3992
Aaron Stannard
@Aaronontheweb
and no further attempts should be made to contact it
if it's not getting removed then that's a bug
I'll take a look at that
Tomasz Jaskula
@tjaskula
@Aaronontheweb this means than in F# passing the same function around is the same issue. I have to use a reference to an actor or embed behavior in a class and pass instances
Aaron Stannard
@Aaronontheweb
I'm not an F# expert but that sounds right
Bart de Boer
@boekabart
@Aaronontheweb the acceptable heartbeat pause does the trick, as in, it delays the disassociation to 60 seconds now. It happens only and always when the system is under load (ingesting a file, leading to 100k's of messages through the ActorSystem). these peaks can and do last up to 60 or more seconds, during which, apparently, not a single heartbeat makes it back and forst. The comms themselves work, since the 'work' command (1 single message) comes from the remote. The work being done is parallel enough to keep my 4 cores busy for a while. But in a way it's strange that not a single one heartbeat makes it through, right?
qwoz
@qwoz

if I want an actor to send a message to all its children, is this the best way to do it?

Context.ActorSelection("*").Tell(message);

or is there a better way?

Aaron Stannard
@Aaronontheweb
Context.GetChildren()
then iterate over the list
qwoz
@qwoz
is that not the same under the hood? Or is ActorSelection not preferred as it consumes CPU evaluating the expression?
Aaron Stannard
@Aaronontheweb
But in a way it's strange that not a single one heartbeat makes it through, right?
100% CPU utilization is a bitch
starts to become difficult to keep any promises at that rate
with the newer transport and some of the other changes we're making
Akka.Remote should be more performant
and require less CPU / memory for even better throughput
1.1 will make some big improvements there
1.5 will be even bigger
@qwoz they're different
ActorSelection gets resolved "outside" the actor
Context.GetChildren() is done in-memory, locally
it's a much faster lookup
and doesn't allocate anything
other than a iterator
qwoz
@qwoz
ok, fair enough... might be nice to have something like that as a convenience method, along the lines of: Context.Children.Tell(message), but I can live with a couple extra lines of code to iterate over it.
Alex Koshelev
@akoshelev
Hi guys. Are you planning to fix #1700 before akka.cluster goes out of beta?
Bart de Boer
@boekabart
@Aaronontheweb now I've done a try to limit the # of main threadpool threads to # cores (4). What happens now is that on all 4 threads, the code is 'waiting' for a queue to produce smth, and this queue is fed by a pair of actors running on a dedicated ThreadPool dispatcher.
(code needs to get a unique id non-async, and we've implemented that using a 'client' and (shared/could-be-remote) 'server' actor, both of which are on that dedicated threadpool)
now, I still get a deadlock, all threadpool threads hung on that Akka.dll!Helios.Concurrency.DedicatedThreadPool.UnfairSemaphore.Wait . Including Remote, by the way
Bart de Boer
@boekabart
so all 4 akka.remote TPthreads and my 2 dedicted TPthreads all hung on that, because the others are basically very slow (a lot of messages to process, taking 1 second each because that's the timeout for retrieving such an ID from the concurrentQueue.
I've seen this come loose, which I suppose happens after the dispatcher is done with it's batch, but what are those other threads syncing with the main TPthreads for!?
(there's an assumption there)
Bart de Boer
@boekabart
... please forget anything I said above... I use persistence in one of these actors, and persistence still runs on the default dispatcher.
Bart de Boer
@boekabart
Still 'deadlocks' but I suspect that's because Sqlite plugin somewhere does something on the threadpool too
Bart de Boer
@boekabart
Read the thing over and over, still can't figure out how to change the default dispatcher in Hocon. Help!
it's not akka.actor.default-dispatcher = my-dispatcher (nullReferenceException)
Bart de Boer
@boekabart
is the only way akka.actor.deployment{"/*"{ dispatcher = my-dispatcher }} ?
Bart de Boer
@boekabart
.. and that works only for 1 level ..
MrR0b0t
@MMrR0b0TT
Hi guys, I'm new on Akka and I have a doubt.
How could I take this exception in the parent (PersonActor) and make my Schedule stop running?
This message was deleted
  public class PersonRunningActor : ReceiveActor
        {
            public PersonRunningActor()
            {
                Receive<PersonMessage>((msg) =>
                {
                    Context.System.Log.Info("PersonRunning receive");

                    if (msg.Idade > 30)
                        throw new Exception("Erro");
                });
            }
        }

        public class PersonActor : ReceiveActor
        {
            public PersonActor()
            {
                Receive<PersonMessage>((msg) =>
                {
                    Context.GetLogger().Info("Person receive");
                    var runningActor = Context.ActorOf<PersonRunningActor>("runningActor");
                    Context.System.Scheduler.ScheduleTellRepeatedly(TimeSpan.Zero, TimeSpan.FromSeconds(2), runningActor, msg, Self);
                });

                ReceiveAny((msg) =>
                {
                    Context.GetLogger().Info(msg.ToString());
                });
            }
        }
MrR0b0t
@MMrR0b0TT
This message was deleted
MrR0b0t
@MMrR0b0TT
Actually, I did something here.
I create the "protected override SupervisorStrategy SupervisorStrategy()", I created an ICancelable and I used it inside my decider of SupervisorStrategy().
Is it a good practice? or anyone have some suggestion? thank you all
Aaron Stannard
@Aaronontheweb
@boekabart you'll want to ask @JeffCyr but I think he's on vacation for a bit
Aaron Stannard
@Aaronontheweb
I think #2025 should take care of some major rejoin issue stuff with Akka.Cluster
I've moved onto looking into some issues with clustered routers for now
Bartosz Sypytkowski
@Horusiath
@tjaskula F# actors don't try to synchronize between themselves in any way. If your actor function captures some variable from outer scope, standard race risks apply. So if data you refer to is thread safe to use, or your actor is the only component using it, you're good to go.
@mkanker ScheduleTellRepeatedly has version returning ICancellable object, which you can use to cancel the scheduled interval. Usually a good place to cancel it is overriden PostStop method which is always invoked when actor is stopped or restarted.
Bart de Boer
@boekabart
In actor.deployment, it seems to be impossible to use actor paths that contain a dot:
akka.actor.deployment { "/somename/process.text/*" { dispatcher = cpc-dispatcher }
crashes startup horribly . Removing the dot in the actor name solves it. This is the stacktrace:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object. at Akka.Actor.Deployer.ParseConfig(String key, Config config) at Akka.Remote.RemoteDeployer.ParseConfig(String key, Config config) at Akka.Actor.Deployer.<>c__DisplayClass3_0.<.ctor>b__1(KeyValuePair`2 x) at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext() at Akka.Actor.Deployer..ctor(Settings settings) at Akka.Remote.RemoteActorRefProvider..ctor(String systemName, Settings settings, EventStream eventStream) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Activator.CreateInstance(Type type, Object[] args) at Akka.Actor.Internal.ActorSystemImpl.ConfigureProvider() at Akka.Actor.Internal.ActorSystemImpl..ctor(String name, Config config)
Is this simply a hocon spec limitation, it 'parses' the dot as it would normally, or is it an implementation bug and should it be taken literally because it's between quotes?
Bart de Boer
@boekabart

The spec ( https://github.com/typesafehub/config/blob/master/HOCON.md#path-expressions ) says

When concatenating the path expression, any . characters outside quoted strings are understood as path separators, while inside quoted strings . has no special meaning. So foo.bar."hello.world" would be a path with three elements, looking up key foo, key bar, then key hello.world.

Implying that my piece of config should be accepted, am I right?