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: Mrproliu <mrproliu@lagou.com> Co-authored-by: 吴晟 Wu Sheng <wu.sheng@foxmail.com>
This commit is contained in:
parent
7d1fdd3ea8
commit
7de392af65
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue