You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by "doleyzi (via GitHub)" <gi...@apache.org> on 2023/06/12 11:19:18 UTC
[GitHub] [inlong] doleyzi commented on a diff in pull request #8182: [INLONG-8180][Agent] Improve the efficiency and safety of log file reading
doleyzi commented on code in PR #8182:
URL: https://github.com/apache/inlong/pull/8182#discussion_r1226401600
##########
inlong-agent/agent-common/src/main/java/org/apache/inlong/agent/message/PackProxyMessage.java:
##########
@@ -144,29 +144,16 @@ public BatchProxyMessage fetchBatch() {
while (!messageQueue.isEmpty()) {
// pre check message size
ProxyMessage peekMessage = messageQueue.peek();
- if (peekMessage == null) {
- break;
- }
-
- // if the message size is greater than max pack size,should drop it.
int peekMessageLength = peekMessage.getBody().length;
- if (peekMessageLength > maxPackSize) {
- LOGGER.warn("message size is {}, greater than max pack size {}, drop it!",
- peekMessage.getBody().length, maxPackSize);
- messageQueue.remove();
- break;
- }
if (resultBatchSize + peekMessageLength > maxPackSize) {
break;
Review Comment:
If do not throw illegal data, will it may cause blocking?
--
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