Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Akka.Cluster.Hosting: ShardOptions.PassivateIdleEntityAfter overwrites custom akka.cluster.sharding.passivate-idle-entity-after setting in HOCON #303

Closed
Aaronontheweb opened this issue May 16, 2023 · 0 comments · Fixed by #318

Comments

@Aaronontheweb
Copy link
Member

Version Information
Version of Akka.NET? v1.5.6
Which Akka.NET Modules? Akka.Cluster.Hosting

Describe the bug

Not 100% if this is a bug or not yet (going off an end-user's report), but if I set

akka.cluster.sharding.passivate-idle-entity-after = 24h #24 hours

In a separate .hocon file added via the AddHoconFile method (with prepending et al done correctly), but if I start any ShardRegion using the default ShardOptions (without specifying ShardOptions.PassivateIdleEntityAfter) I get the following logs:

image

This indicates that we're still using the default 2 minutes setting, and I believe that's because of our default value for ShardOptions here:

public TimeSpan? PassivateIdleEntityAfter { get; set; } = TimeSpan.FromMinutes(2);

To Reproduce

  1. Create ActorSystem with akka.cluster.sharding.passivate-idle-entity-after = 24h
  2. Start ShardRegion using Akka.Hosting;
  3. Check to see if the passivation timeout is 2 minutes instead of 24 hours.

Additional context

We should probably make null the default value here so that way the HOCON values will be used if not user-supplied value is defined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant