You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/05/05 06:03:57 UTC
[GitHub] [incubator-inlong] luchunliang commented on a diff in pull request #4064: [INLONG-4056][DataProxy] DataProxy support to return SDK/Agent a response after event is saved in cache cluster.
luchunliang commented on code in PR #4064:
URL: https://github.com/apache/incubator-inlong/pull/4064#discussion_r865577286
##########
inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/source/tcp/InlongTcpChannelHandler.java:
##########
@@ -137,7 +140,65 @@ private void decodeVersion1(ChannelHandlerContext ctx, ByteBuf cb, int bodyLengt
}
// uncompress
List<ProxyEvent> events = EventUtils.decodeSdkPack(packObject);
- // topic
+ // response success if event size is zero
+ if (events.size() == 0) {
+ this.responsePackage(ctx, ResultCode.SUCCUSS, packObject);
+ }
+ // process
+ if (!CommonPropertiesHolder.isResponseAfterSave()) {
+ this.processAndResponse(ctx, packObject, events);
+ } else {
+ this.processAndWaitingSave(ctx, packObject, events);
+ }
+ }
+
+ /**
+ * processAndResponse
Review Comment:
fix it
--
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