This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new dded5cd2898 [fix](auditlog) fix AuditLoaderPlugin occasional
occurrence garbled Chinese characters in audit logs (#61902)
dded5cd2898 is described below
commit dded5cd2898ecdde2fadf2ca0363d4521e56868b
Author: Guangming Lu <[email protected]>
AuthorDate: Thu Apr 9 14:40:05 2026 +0800
[fix](auditlog) fix AuditLoaderPlugin occasional occurrence garbled Chinese
characters in audit logs (#61902)
---
fe/fe-core/src/main/java/org/apache/doris/qe/AuditLogHelper.java | 2 +-
.../java/org/apache/doris/plugin/audit/custom/AuditLoaderPlugin.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/AuditLogHelper.java
b/fe/fe-core/src/main/java/org/apache/doris/qe/AuditLogHelper.java
index 4229704a566..cc4ce940f17 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/AuditLogHelper.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/AuditLogHelper.java
@@ -185,7 +185,7 @@ public class AuditLogHelper {
}
Charset utf8Charset = Charset.forName("UTF-8");
CharsetDecoder decoder = utf8Charset.newDecoder();
- byte[] sb = str.getBytes();
+ byte[] sb = str.getBytes(utf8Charset);
ByteBuffer buffer = ByteBuffer.wrap(sb, 0, maxLen);
CharBuffer charBuffer = CharBuffer.allocate(maxLen);
decoder.onMalformedInput(CodingErrorAction.IGNORE);
diff --git
a/fe_plugins/auditloader/src/main/java/org/apache/doris/plugin/audit/custom/AuditLoaderPlugin.java
b/fe_plugins/auditloader/src/main/java/org/apache/doris/plugin/audit/custom/AuditLoaderPlugin.java
index 4d873b57fe8..a3c850c654a 100755
---
a/fe_plugins/auditloader/src/main/java/org/apache/doris/plugin/audit/custom/AuditLoaderPlugin.java
+++
b/fe_plugins/auditloader/src/main/java/org/apache/doris/plugin/audit/custom/AuditLoaderPlugin.java
@@ -199,7 +199,7 @@ public class AuditLoaderPlugin extends Plugin implements
AuditPlugin {
}
Charset utf8Charset = Charset.forName("UTF-8");
CharsetDecoder decoder = utf8Charset.newDecoder();
- byte[] sb = str.getBytes();
+ byte[] sb = str.getBytes(utf8Charset);
ByteBuffer buffer = ByteBuffer.wrap(sb, 0, maxLen);
CharBuffer charBuffer = CharBuffer.allocate(maxLen);
decoder.onMalformedInput(CodingErrorAction.IGNORE);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]