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 35f05fd8713 [fix](audit) The time field in the audit log table is set 
to the millisecond level (#31096)
35f05fd8713 is described below

commit 35f05fd871393d99313f0a14666fd433ff2d8135
Author: lw112 <131352377+felixw...@users.noreply.github.com>
AuthorDate: Thu Feb 22 00:01:42 2024 +0800

    [fix](audit) The time field in the audit log table is set to the 
millisecond level (#31096)
---
 fe/fe-core/src/main/java/org/apache/doris/catalog/InternalSchema.java   | 2 +-
 .../src/main/java/org/apache/doris/plugin/audit/AuditLoaderPlugin.java  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/catalog/InternalSchema.java 
b/fe/fe-core/src/main/java/org/apache/doris/catalog/InternalSchema.java
index 7d348761704..5a4934ec2a4 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/InternalSchema.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/InternalSchema.java
@@ -68,7 +68,7 @@ public class InternalSchema {
         // audit table
         AUDIT_SCHEMA = new ArrayList<>();
         AUDIT_SCHEMA.add(new ColumnDef("query_id", TypeDef.createVarchar(48), 
true));
-        AUDIT_SCHEMA.add(new ColumnDef("time", 
TypeDef.create(PrimitiveType.DATETIME), true));
+        AUDIT_SCHEMA.add(new ColumnDef("time", TypeDef.createDatetimeV2(3), 
true));
         AUDIT_SCHEMA.add(new ColumnDef("client_ip", 
TypeDef.createVarchar(128), true));
         AUDIT_SCHEMA.add(new ColumnDef("user", TypeDef.createVarchar(128), 
true));
         AUDIT_SCHEMA.add(new ColumnDef("catalog", TypeDef.createVarchar(128), 
true));
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/plugin/audit/AuditLoaderPlugin.java 
b/fe/fe-core/src/main/java/org/apache/doris/plugin/audit/AuditLoaderPlugin.java
index d8941605c35..f5096d9a8f6 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/plugin/audit/AuditLoaderPlugin.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/plugin/audit/AuditLoaderPlugin.java
@@ -148,7 +148,7 @@ public class AuditLoaderPlugin extends Plugin implements 
AuditPlugin {
 
     private void fillLogBuffer(AuditEvent event, StringBuilder logBuffer) {
         logBuffer.append(event.queryId).append("\t");
-        
logBuffer.append(TimeUtils.longToTimeString(event.timestamp)).append("\t");
+        
logBuffer.append(TimeUtils.longToTimeStringWithms(event.timestamp)).append("\t");
         logBuffer.append(event.clientIp).append("\t");
         logBuffer.append(event.user).append("\t");
         logBuffer.append(event.ctl).append("\t");


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to