comedy icon indicating copy to clipboard operation
comedy copied to clipboard

hot config reloads do not consider actor custom parameters

Open pct-cclausen opened this issue 5 years ago • 7 comments

  1. Initialize a forked (maybe also in-memory?) actor with custom parameters. I primarily use this to pass in some other ActorRefs.
  2. The actor reads from getCustomParameters() in the initialize method, everything works.
  3. Change the configuration of that actor.
  4. The actor gets destroyed and recreated, but getCustomParameters() now is undefined. debug mode shows the custom parameters are just gone from the create-actor message used internally.

I guess the hot reloading code is just missing this behavior entirely?

pct-cclausen avatar Dec 06 '20 15:12 pct-cclausen

Hi @pct-cclausen ! Thanks for your report! Will try to fix that in nearest time!

weekens avatar Dec 07 '20 07:12 weekens

Fixing this in https://github.com/untu/comedy/pull/57.

weekens avatar Dec 15 '20 18:12 weekens

Fix released in version 2.1.2. Thanks again for the report!

weekens avatar Dec 15 '20 19:12 weekens

Nice, thanks for the fix. Works like a charm :)

pct-cclausen avatar Dec 16 '20 16:12 pct-cclausen

Actually, I believe this seems still to be broken in case of threaded actors. Playing around, it works for forked actors now, but I still get errors when I used threaded instead.

pct-cclausen avatar Dec 16 '20 16:12 pct-cclausen

Okay, I'm reopening it then. Will check.

weekens avatar Dec 16 '20 17:12 weekens

@pct-cclausen This time, I'm afraid, the problem does not reproduce that easy. I've added the test case for threaded actor (see hot-config-fix-2 branch), and it works fine. What kind of errors do you get?

weekens avatar Jan 10 '21 07:01 weekens