This is an automated email from the ASF dual-hosted git repository.

gavinchou pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new 1603b8b2e7f [fix](fe) Fix `PluginMgr.getActivePluginList` npt (#41466)
1603b8b2e7f is described below

commit 1603b8b2e7f643a14fe0f6e346a2a2e93e93fb9b
Author: Lei Zhang <[email protected]>
AuthorDate: Tue Oct 8 15:23:05 2024 +0800

    [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
    
    <!--Describe your changes.-->
---
 fe/fe-core/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 ea69b247e66..daf93f44d96 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 class PluginMgr implements Writable {
 
         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());
             }
         });


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to