github-actions[bot] commented on code in PR #70338:
URL: https://github.com/apache/doris/pull/70338#discussion_r4492689479


##########
fe/fe-core/src/main/java/org/apache/doris/connector/ConnectorPluginManager.java:
##########
@@ -314,9 +332,21 @@ public void loadPlugins(List<Path> pluginRoots) {
                 runtimeManager.discard(handle.getPluginName());
                 continue;
             }
+            ConnectorProvider provider = handle.getFactory();
+            // Snapshot the security surface before publishing anything: it is 
plugin code, a connector may
+            // build it through its own ServiceLoader, and one bad plugin dir 
must not stop FE.
+            ConnectorSecuritySurface securitySurface;
+            try {
+                securitySurface = provider.securitySurface();
+            } catch (RuntimeException | LinkageError e) {

Review Comment:
   [P2] Catch ServiceConfigurationError during eager surface discovery
   
   An otherwise valid connector directory with a stale metastore service 
descriptor, or a backend whose constructor fails, now prevents FE startup. 
Iceberg/Paimon/Hive `securitySurface()` calls 
`MetaStoreProviders.sensitivePropertyKeys()`, whose static initializer runs 
`ServiceLoader`; those lookup/instantiation failures throw 
`ServiceConfigurationError`, an `Error` outside both `RuntimeException` and 
`LinkageError`. It escapes this catch through 
`Env.initConnectorPluginManager()` before image loading, defeating the 
documented per-plugin skip behavior. Previously these nested backends were 
discovered during catalog validation/access rather than directory registration. 
Catch `ServiceConfigurationError` here and at the new builtin surface boundary, 
and cover a failing nested loader; the added `IllegalStateException` fixture 
does not exercise this case.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to