orleans
orleans copied to clipboard
Fix shutdown timeout not respected to the settings
Due to the discussion here (https://github.com/dotnet/orleans/issues/6832), it seems we need to configure DeactivationTimeout
as well else silo host will still shutdown after DeactivationTimeout
.
Let me know if this is the correct way to do? thanks
Thanks for the PR!
Sorry for the late comment.
I think it would be better to add a config validator that would check that HostOptions.ShutdownTimeout >= GrainCollectionOptions.DeactivationTimeout
, because even with your change you could configure on or the other setting independently.
You can look at our implementation of ClusterOptionsValidator
, and do one for HostOptions
, it should be easy to start.
Let me know if you have any question, or if you prefer me to do the change.
Hi @benjaminpetit, for adding HostOptionsValidator, I will needs to add package Microsoft.Extensions.Hosting
to Orleans.Runtime
, is it ok with this?
Fixed at the source: https://github.com/dotnet/runtime/issues/63709
Hi @ReubenBond I think your changes is only change the default timeout to 30seconds, it doesn't fix the issue in here https://github.com/dotnet/orleans/issues/6832
Yes, you're right. I'm somewhat wary of adding a dependency to Microsoft.Extensions.Hosting just for this (config validator), but I am ok with it. @benjaminpetit what do you think?
Adding a the hosting dependency just to validate a configuration value that is likely to be valid now (since both default to 30s on .NET 7) seems a bit much. Could we just update the inline documentation for DeactivationTimeout
to warn about the hosting timeout?
And should we change the default for DeactivationTimeout
to 25 or 29s to be actually less than hosting shutdown timeout?