Open lissdy opened 3 weeks ago
Hi @lissdy, by default the refresh interval should be 30 seconds if you haven't set it manually in ConfigureRefresh
. I'm not able to reproduce this behavior after copying the quickstart locally with version 6.1.1 of Microsoft.Azure.AppConfiguration.AspNetCore
. I selected multiple key-value collections as you did and set a few different sentinel key-values.
Here are some things I'd want to check from your end:
AddAzureAppConfiguration
and UseAzureAppConfiguration
in the order shown in the quickstart?Debug
level, can you check your logs to see which key-values are changing and if the sentinel key-value is logged as a change? The instructions for this can be found in the page you sent.Thanks @amerjusupovic for the reply. I have set the refresh interval as 300 seconds.
RefreshAll
as true, suppose all registered key-value collections shared:testService:, service:testService: and shared:config:* should be refreshed, right? Yes, followed the quickstart, and here is how I set sentinel key and register key
private static AzureAppConfigurationOptions ConfigAacOptions(this AzureAppConfigurationOptions options, HashSet<string> sentinelKeys, HashSet<string> registerKeys, double cacheExpirationInSeconds)
{
options
.ConfigureClientOptions(clientOptions =>
{
clientOptions.Retry.MaxRetries = ConfigConstants.MaxRetries;
})
.ConfigureRefresh(refresh =>
{
foreach (var i in sentinelKeys)
{
refresh.Register(key: i, refreshAll: true); // set sentinel key
}
refresh
.SetCacheExpiration(TimeSpan.FromSeconds(cacheExpirationInSeconds));
});
foreach (var i in registerKeys)
{
options.Select(i); // set register key
}
return options;
}
You're right, if a key is registered with refreshAll
set to true then all selected key-values should be refreshed. Is there any way you could try upgrading to the newest provider version, 7.3.0?
Upgraded to the newest version 7.3.0, will try to reproduce the issue and let you know the update, thanks
Followed https://learn.microsoft.com/en-us/azure/azure-app-configuration/enable-dynamic-configuration-aspnet-core We are using poll model for dynamic configuration
As the screenshot shows, we set three sentinel keys
service:testService:sentinel
,shared:testService:sentinel
andshared:config:sentinel
, and setRefreshAll
as true for all sentinel keys. Three KeyValueSelectors areshared:testService:*
,service:testService:*
andshared:config:*
Suppose any sentinel value change should trigger the service instance refresh all registered configurations.But we noticed when we update configuration values and sentinel values, some KeyValueSelectors get refreshed but some are not. Service still retrieving the old values even 2 days later. We have to restart the service to ensure all configurations are refreshed.
Suppose all selected configuration values should be refreshed in minutes, could you please confirm if the case is normal? How should we ensure selected configuration values get refreshed after configuration change?
SDK version: 6.1.1