diff --git a/services/distributeddataservice/service/data_share/common/scheduler_manager.cpp b/services/distributeddataservice/service/data_share/common/scheduler_manager.cpp index fa7ec6a969581674ccc00a3ed10535173db59c8d..bb75aa2c53efd08d83fa3afb942295bf2f5eda78 100644 --- a/services/distributeddataservice/service/data_share/common/scheduler_manager.cpp +++ b/services/distributeddataservice/service/data_share/common/scheduler_manager.cpp @@ -175,16 +175,15 @@ bool SchedulerManager::GetSchedulerStatus(const Key &key) std::lock_guard lock(mutex_); uint32_t lastSize = lastStatusCacheSize_; uint32_t nowSize = schedulerStatusCache_.size(); - if (nowSize != lastSize) { - lastStatusCacheSize_ = nowSize; - ZLOGI("size changed last %{public}d, now %{public}d", lastSize, nowSize); - } auto it = schedulerStatusCache_.find(key); if (it != schedulerStatusCache_.end()) { enabled = it->second; } else { - ZLOGW("key not found, %{public}s, %{public}" PRId64 ", %{public}s", - URIUtils::Anonymous(key.uri).c_str(), key.subscriberId, key.bundleName.c_str()); + ZLOGW("key not found, %{public}s, %{public}" PRId64 ", %{public}s, size last %{public}d, now %{public}d", + URIUtils::Anonymous(key.uri).c_str(), key.subscriberId, key.bundleName.c_str(), lastSize, nowSize); + } + if (nowSize != lastSize) { + lastStatusCacheSize_ = nowSize; } return enabled; }