pjfanning commented on PR #1919: URL: https://github.com/apache/pekko/pull/1919#issuecomment-3044903057
> Hi, I pushed some new commits: I added a feature flag to enable the fix and also ported the fix to DurableStateBehavior. I have, however, two questions. > > The first one is: when I added the configuration parameter to DurableStateSettings, I noticed that they are the same (I mean, also same config path) as the ones of EventSourcedSettings. Is this expected? > > The other one might be important, but I need help from somebody that is more familiar than me with pekko internals. The fix I added breaks the recursion by using a while loop in `onCommand` and storing recursive `onCommand` call parameters during the call to `onMessage`, which are then used when the control gets back to `onCommand`. There is, however, one function in the recursion chain, that calls another function _after_ the call leading to the recursion: `org.apache.pekko.actor.typed.Behavior$.interpret` calls `start` on the beavior returned by `onMessage`. Since it's not clear to me what `start` actually does and what "starting a behavior" means, my fear is that the recursive and non-recursive versions might do different things, at least in some edge cases. Can this be a problem? * Regarding the configs, they do look a bit strange to me, sharing paths where you would expect them to have their own paths. Changing this is a breaking change and would be better discussed as a standalone issue. We don't see to get too many complaints so the issue doesn't seem to be affecting people too much in real world scenarios. * reordering the code to allow tailrec to work: this does come with risks. All we really have is our test coverage and if that passes then maybe we should be happy enough. But yes, the test coverage could be better. We have a config that controls whether the new code is applied. I wonder if the code path for when the config is set to keep the Pekko 1.0/1.1 (and Akka 2.6) behaviour, that we keep that code free of the tailrec refactor - ie we only try to make the new code path tail recursive and the old code path remains as similar as possible to the code that exists in the main branch prior to this PR. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org For additional commands, e-mail: notifications-h...@pekko.apache.org