You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by "healchow (via GitHub)" <gi...@apache.org> on 2023/06/26 06:58:19 UTC

[GitHub] [inlong] healchow commented on a diff in pull request #8319: [INLONG-8315][Audit] Filter out illegal data that is more than 7 days old (configurable)

healchow commented on code in PR #8319:
URL: https://github.com/apache/inlong/pull/8319#discussion_r1241708039


##########
inlong-audit/audit-proxy/src/main/java/org/apache/inlong/audit/source/ServerMessageHandler.java:
##########
@@ -147,6 +151,13 @@ private AuditReply handleRequest(AuditRequest auditRequest) throws Exception {
         List<AuditMessageBody> bodyList = auditRequest.getMsgBodyList();
         int errorMsgBody = 0;
         for (AuditMessageBody auditMessageBody : bodyList) {
+            long msgDays = messageDays(auditMessageBody.getLogTs());
+            if (msgDays >= this.msgValidThresholdDays) {
+                String msg = String.format("Discard the data as it is from" + msgDays +

Review Comment:
   Unused `String.format`, because not use `%s` in string here.
   
   BTW, please add one blank after `is from` and before `days ago`.



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org