OIiveirra commented on code in PR #68811:
URL: https://github.com/apache/doris/pull/68811#discussion_r4237509819


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/ExternalCatalog.java:
##########
@@ -368,7 +376,30 @@ public final synchronized void makeSureInitialized() {
      * {@code alter catalog ... set properties} triggers {@link 
#resetToUninitialized(boolean)}.
      */
     protected void recordDeferredInitError(Throwable t) {
-        this.errorMsg = ExceptionUtils.getRootCauseMessage(t);
+        this.errorMsg = initErrorMessage(t);
+    }
+
+    static String initErrorMessage(Throwable error) {
+        DiagnosticException diagnostic = findDiagnosticException(error);
+        return diagnostic == null ? ExceptionUtils.getRootCauseMessage(error) 
: diagnostic.getDiagnosticMessage();

Review Comment:
   已在 18eadfc04c8 修复。ConnectContextUtil 现在通过 ExternalCatalog.initErrorMessage 
提取 DiagnosticException 的脱敏消息;ExternalCatalog/CatalogIf 的 metadata catch 
日志也只记录脱敏诊断堆栈或通用消息,不再打印原始 Throwable cause。



-- 
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