orleans icon indicating copy to clipboard operation
orleans copied to clipboard

Fix shutdown timeout not respected to the settings

Open games opened this issue 4 years ago • 6 comments

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

games avatar Nov 18 '20 05:11 games

CLA assistant check
All CLA requirements met.

dnfadmin avatar Nov 18 '20 05:11 dnfadmin

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.

benjaminpetit avatar Feb 09 '21 01:02 benjaminpetit

Hi @benjaminpetit, for adding HostOptionsValidator, I will needs to add package Microsoft.Extensions.Hosting to Orleans.Runtime, is it ok with this?

games avatar Mar 08 '21 09:03 games

Fixed at the source: https://github.com/dotnet/runtime/issues/63709

ReubenBond avatar Feb 12 '22 00:02 ReubenBond

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

games avatar Feb 15 '22 04:02 games

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?

ReubenBond avatar Feb 15 '22 04:02 ReubenBond

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?

pentp avatar Jan 25 '23 09:01 pentp