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

doleyzi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git


The following commit(s) were added to refs/heads/master by this push:
     new 1131468195 [INLONG-12067][Audit] Optimize the auditing data statistics 
by day (#12068)
1131468195 is described below

commit 113146819554844ea3aa19e5192de35dcb4466a6
Author: doleyzi <[email protected]>
AuthorDate: Wed Jan 21 18:44:25 2026 +0800

    [INLONG-12067][Audit] Optimize the auditing data statistics by day (#12068)
    
    Co-authored-by: doleyzi <[email protected]>
---
 .../java/org/apache/inlong/audit/service/source/JdbcSource.java   | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git 
a/inlong-audit/audit-service/src/main/java/org/apache/inlong/audit/service/source/JdbcSource.java
 
b/inlong-audit/audit-service/src/main/java/org/apache/inlong/audit/service/source/JdbcSource.java
index 72492031e6..2e51d5fef3 100644
--- 
a/inlong-audit/audit-service/src/main/java/org/apache/inlong/audit/service/source/JdbcSource.java
+++ 
b/inlong-audit/audit-service/src/main/java/org/apache/inlong/audit/service/source/JdbcSource.java
@@ -93,11 +93,15 @@ public class JdbcSource {
         init();
         int statInterval = 
Configuration.getInstance().get(KEY_SOURCE_DB_STAT_INTERVAL,
                 DEFAULT_SOURCE_DB_STAT_INTERVAL);
+
+        int offset = 
Configuration.getInstance().get(KEY_STAT_BACK_INITIAL_OFFSET,
+                DEFAULT_STAT_BACK_INITIAL_OFFSET);
+
         if (sourceConfig.getAuditCycle() == DAY) {
             statInterval = HOUR.getValue();
+            offset = 0;
         }
-        int offset = 
Configuration.getInstance().get(KEY_STAT_BACK_INITIAL_OFFSET,
-                DEFAULT_STAT_BACK_INITIAL_OFFSET);
+
         for (int statBackTime = 0; statBackTime < 
sourceConfig.getStatBackTimes(); statBackTime++) {
             ScheduledExecutorService timer =
                     statTimers.computeIfAbsent(statBackTime, k -> 
Executors.newSingleThreadScheduledExecutor());

Reply via email to