Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Oct 16 22:15
    Aaronontheweb synchronize #3889
  • Oct 16 21:00
    dependabot-preview[bot] synchronize #3986
  • Oct 16 21:00

    dependabot-preview[bot] on nuget

    Bump NUnit from 3.6.1 to 3.12.0… (compare)

  • Oct 16 21:00
    dependabot-preview[bot] synchronize #3985
  • Oct 16 21:00

    dependabot-preview[bot] on nuget

    Bump FsCheck.Xunit from 2.9.0 t… (compare)

  • Oct 16 21:00
    dependabot-preview[bot] synchronize #3983
  • Oct 16 21:00

    dependabot-preview[bot] on nuget

    Bump ApprovalUtilities from 3.0… (compare)

  • Oct 16 21:00
    dependabot-preview[bot] edited #3985
  • Oct 16 21:00
    dependabot-preview[bot] edited #3986
  • Oct 16 21:00
    dependabot-preview[bot] synchronize #3982
  • Oct 16 21:00
    dependabot-preview[bot] synchronize #3987
  • Oct 16 21:00

    dependabot-preview[bot] on nuget

    Bump FsPickler from 5.2.0 to 5.… (compare)

  • Oct 16 21:00

    dependabot-preview[bot] on nuget

    Bump LightningDB from 0.9.8 to … (compare)

  • Oct 16 21:00
    dependabot-preview[bot] edited #3982
  • Oct 16 21:00
    dependabot-preview[bot] edited #3983
  • Oct 16 21:00
    dependabot-preview[bot] edited #3987
  • Oct 16 20:59
    dependabot-preview[bot] edited #3982
  • Oct 16 20:59
    dependabot-preview[bot] edited #3985
  • Oct 16 20:59
    dependabot-preview[bot] edited #3987
  • Oct 16 20:59
    dependabot-preview[bot] edited #3986
Andrey Leskov
@andreyleskov
may be I miss something in how pool is interacting with eventStream subscriptions ?
Bartosz Sypytkowski
@Horusiath
@andreyleskov clustered routers?
Andrey Leskov
@andreyleskov
no
one node with akka.remote
Bartosz Sypytkowski
@Horusiath
you're taking into account, that event stream works only for actors inside the same actor system?
Andrey Leskov
@andreyleskov
This message was deleted
Sure
I have only one system
and sometimes message is delivered good and sometimes not
here is how I create router :
 var routesMap = msg.Routes.ToDictionary(r => r.Topic, r => r.CorrelationField);

            if (routesMap.All(r => r.Value == null))
            {
                Log.Debug("Created random pool router to pass messages to {actor} ", msg.ActorName);

                return new RandomPool(Environment.ProcessorCount);
            }


            var pool = new ConsistentHashingPool(Environment.ProcessorCount,
                       m =>
                       {
                           var type = m.GetType();
                           string prop = null;

                           if (!routesMap.TryGetValue(type.FullName, out prop))
                                throw new CannotFindRouteException(m);

                           var value = type.GetProperty(prop).GetValue(m);

                           LogManager.GetLogger().Trace("routed message {msg} by property {property} with value {value}", m, prop, value);
                           return value;
                       });
it is a function returning a router
and it is passed to Props.WithRouter after
Bartosz Sypytkowski
@Horusiath
did you manage to make it into reproducible example?
this would help a lot
Andrey Leskov
@andreyleskov
right now no 8 ( working on it. I know it is correlated with system restart )
when I restart applications messages start to reach their subscribers for Ids not working before
Bartosz Sypytkowski
@Horusiath
routee actors are standard ones or maybe persistent actors or something else?
Andrey Leskov
@andreyleskov
in general any types of actors
but not persistent for sure
problems arise with routee witch itself controls a pack of persistence actors
and reroutes messages to it
routee just does not receive a message
Bartosz Sypytkowski
@Horusiath
routee witch itself controls a pack of persistence actors or router witch itself controls a pack of persistence actors?
Andrey Leskov
@andreyleskov
routee. I've tried a pool with persistence actors, it was bad )
Bartosz Sypytkowski
@Horusiath
I wanted to say the same ;)
Andrey Leskov
@andreyleskov
This message was deleted
schema is : publish message to event stream -> controller with pool router -> persistence actor living in controller internal collection
Bartosz Sypytkowski
@Horusiath
it would be good to make sure on which connection message has been lost
Andrey Leskov
@andreyleskov
I suspect hashing logic, and even added logging inside )) But cannot make logging work for now, investigating
Bartosz Sypytkowski
@Horusiath
heh, I've never liked routers (especially CH), too much magic. Never used them in any practical scenario and I'm still happy, that they're not going to be a part of akka-typed
Andrey Leskov
@andreyleskov
I'll try to remove ConsistentHashingPool at all as an option
BTW: i have a stream of events published to EventStream, and stateless handlers writing events into DB
How would you recommend to parallel handlers work? I'm using random pool for now
Bartosz Sypytkowski
@Horusiath
this week I was working on new sql journal impl, which was optimized to handle much greater amount of requests than previous one using request batching (see: #2389)
Andrey Leskov
@andreyleskov
@Horusiath cool ! Can't wait for it
and is their any plans to remove startup query for all ids in database ?
select distinct PersistenceId from Journal
Bartosz Sypytkowski
@Horusiath
but this is quite big amount of code. For simpler case you can simply use random pools. I don't even know if EventStream is really what you need. I'm used to just passing actor reference to destination actor in constructor or in message itself.
@andreyleskov yes, I've removed it. Now it will be only called once, when someone actually will request for all persistence ids
Andrey Leskov
@andreyleskov
yesss! thank you a lot ^_^
Bartosz Sypytkowski
@Horusiath
I thank you ;) Your feedback was really welcome here.
Andrey Leskov
@andreyleskov
after several months in production I have 1.5 millions ids, so query is killing my db on start
Andrey Leskov
@andreyleskov
btw : after investigation it seems if I subscribe an actor with consistent hashing pool to EventStream only one of several spawned pool children will receive messages
will create a reproducable test
Andrey Leskov
@andreyleskov
no, it is wrong hypothesis
Andrey Leskov
@andreyleskov
It seems it is my fault - receivers just die with time >_<
Andrey Leskov
@andreyleskov
@Horusiath Thanks a lot for help, I've shooted myself : " If a third party terminates a child by way of the system.Stop(child) method or sending a PoisonPill, the supervisor might well be affected."
controller terminates children after inactivity : they call Context.Stop(self)
and controller watches over them to get Terminated message