From 5fd2ef7d66cc9ffa0c1bbd3d1c0794c0b8912de7 Mon Sep 17 00:00:00 2001 From: Lei Zhang <27994433+SWJTU-ZhangLei@users.noreply.github.com> Date: Tue, 8 Oct 2024 15:23:05 +0800 Subject: [PATCH] [fix](fe) Fix `PluginMgr.getActivePluginList` npt (#41466) ``` Exception in thread "AuditEventProcessor" java.lang.NullPointerException: at index 2 at com.google.common.collect.ObjectArrays.checkElementNotNull(ObjectArrays.java:232) at com.google.common.collect.ObjectArrays.checkElementsNotNull(ObjectArrays.java:222) at com.google.common.collect.ObjectArrays.checkElementsNotNull(ObjectArrays.java:216) at com.google.common.collect.ImmutableList.construct(ImmutableList.java:353) at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:265) at org.apache.doris.plugin.PluginMgr.getActivePluginList(PluginMgr.java:300) at org.apache.doris.qe.AuditEventProcessor$Worker.run(AuditEventProcessor.java:120) at java.base/java.lang.Thread.run(Thread.java:833) ``` ## Proposed changes Issue Number: close #xxx --- .../src/main/java/org/apache/doris/plugin/PluginMgr.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fe/fe-core/src/main/java/org/apache/doris/plugin/PluginMgr.java b/fe/fe-core/src/main/java/org/apache/doris/plugin/PluginMgr.java index ea69b247e66427..daf93f44d96e12 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/plugin/PluginMgr.java +++ b/fe/fe-core/src/main/java/org/apache/doris/plugin/PluginMgr.java @@ -293,6 +293,10 @@ public final List getActivePluginList(PluginType type) { m.values().forEach(d -> { if (d.getStatus() == PluginStatus.INSTALLED) { + if (d.getPlugin() == null) { + LOG.warn("PluginLoader({}) status is INSTALLED, but plugin is null", d); + return; + } l.add(d.getPlugin()); } });