未验证 提交 7de392af 编写于 作者: 静夜思朝颜's avatar 静夜思朝颜 提交者: GitHub

fix cache update timer exception when disable profile in the backend (#4682)

* fix cache update timer exception when disable profile in the backend

* add comment
Co-authored-by: NMrproliu <mrproliu@lagou.com>
Co-authored-by: wu-sheng's avatar吴晟 Wu Sheng <wu.sheng@foxmail.com>
上级 7d1fdd3e
......@@ -26,8 +26,10 @@ import java.util.stream.Collectors;
import lombok.extern.slf4j.Slf4j;
import org.apache.skywalking.apm.util.RunnableWithExceptionProtection;
import org.apache.skywalking.oap.server.core.CoreModule;
import org.apache.skywalking.oap.server.core.analysis.DisableRegister;
import org.apache.skywalking.oap.server.core.analysis.TimeBucket;
import org.apache.skywalking.oap.server.core.analysis.manual.networkalias.NetworkAddressAlias;
import org.apache.skywalking.oap.server.core.profile.ProfileTaskRecord;
import org.apache.skywalking.oap.server.core.query.type.ProfileTask;
import org.apache.skywalking.oap.server.core.storage.StorageModule;
import org.apache.skywalking.oap.server.core.storage.cache.INetworkAddressAliasDAO;
......@@ -55,7 +57,10 @@ public enum CacheUpdateTimer {
private void update(ModuleDefineHolder moduleDefineHolder) {
updateNetAddressAliasCache(moduleDefineHolder);
updateProfileTask(moduleDefineHolder);
// Profile could be disabled by the OAL script. Only load the task when it is activated.
if (!DisableRegister.INSTANCE.include(ProfileTaskRecord.INDEX_NAME)) {
updateProfileTask(moduleDefineHolder);
}
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册