fix(client): asynchronously check if config is empty to avoid uninitialized panic #1000056931

Signed-off-by: clinx <chenlin1@oppo.com>
This commit is contained in:
clinx 2025-04-11 16:46:20 +08:00 committed by zhumingze1108
parent f7b20d6d9f
commit a0cf5a13f1

View File

@ -444,7 +444,7 @@ func (client *ExtentClient) enableRemoteCacheCluster(enabled bool) {
}
func (client *ExtentClient) UpdateRemoteCacheConfig(view *proto.SimpleVolView) {
if client.extentConfig.NeedRemoteCache {
if client.extentConfig != nil && client.extentConfig.NeedRemoteCache {
client.RemoteCache.UpdateRemoteCacheConfig(client, view)
} else {
log.LogInfof("UpdateRemoteCacheConfig do nothing, client.extentConfig.NeedRemoteCache %v", client.extentConfig.NeedRemoteCache)