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

gosonzhang 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 ee847f0630 [INLONG-8679][DataProxy] Migrate index-related variables to 
abstract classes (#8680)
ee847f0630 is described below

commit ee847f06303f726416cce351078f86230ee7d427
Author: Goson Zhang <[email protected]>
AuthorDate: Wed Aug 9 16:46:27 2023 +0800

    [INLONG-8679][DataProxy] Migrate index-related variables to abstract 
classes (#8680)
---
 .../org/apache/inlong/dataproxy/source/ServerMessageHandler.java    | 2 +-
 .../org/apache/inlong/dataproxy/source/v0msg/AbsV0MsgCodec.java     | 6 ++++++
 .../java/org/apache/inlong/dataproxy/source/v0msg/CodecBinMsg.java  | 2 --
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git 
a/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/source/ServerMessageHandler.java
 
b/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/source/ServerMessageHandler.java
index 485d74468f..61788496ae 100644
--- 
a/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/source/ServerMessageHandler.java
+++ 
b/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/source/ServerMessageHandler.java
@@ -306,7 +306,7 @@ public class ServerMessageHandler extends 
ChannelInboundHandlerAdapter {
                     msgCodec.getTopicName(), msgCodec.getStrRemoteIP(), 
msgCodec.getMsgProcType(),
                     msgCodec.getDataTimeMs(), msgCodec.getMsgPkgTime(), 1);
             source.addMetric(false, event.getBody().length, event);
-            if (msgCodec.isNeedResp() && !msgCodec.isOrderOrProxy()) {
+            if (msgCodec.isNeedResp()) {
                 
msgCodec.setFailureInfo(DataProxyErrCode.PUT_EVENT_TO_CHANNEL_FAILURE,
                         strBuff.append("Put event to channel failure: 
").append(ex.getMessage()).toString());
                 strBuff.delete(0, strBuff.length());
diff --git 
a/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/source/v0msg/AbsV0MsgCodec.java
 
b/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/source/v0msg/AbsV0MsgCodec.java
index 78a24792be..a4e3a33305 100644
--- 
a/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/source/v0msg/AbsV0MsgCodec.java
+++ 
b/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/source/v0msg/AbsV0MsgCodec.java
@@ -62,6 +62,8 @@ public abstract class AbsV0MsgCodec {
     protected String topicName;
     protected String msgSeqId = "";
     protected long uniq = -1L;
+    protected boolean indexMsg = false;
+    protected boolean fileCheckMsg = false;
     protected boolean isOrderOrProxy = false;
     protected String msgProcType = "b2b";
     protected boolean needResp = true;
@@ -89,6 +91,10 @@ public abstract class AbsV0MsgCodec {
         return this.errMsg;
     }
 
+    public boolean isIndexMsg() {
+        return indexMsg;
+    }
+
     public boolean isNeedResp() {
         return this.needResp;
     }
diff --git 
a/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/source/v0msg/CodecBinMsg.java
 
b/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/source/v0msg/CodecBinMsg.java
index a0e4adc6b1..017191dc67 100644
--- 
a/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/source/v0msg/CodecBinMsg.java
+++ 
b/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/source/v0msg/CodecBinMsg.java
@@ -60,8 +60,6 @@ public class CodecBinMsg extends AbsV0MsgCodec {
     private long dataTimeSec;
     private boolean num2name = false;
     private boolean transNum2Name = false;
-    private boolean indexMsg = false;
-    private boolean fileCheckMsg = false;
     private boolean needTraceMsg = false;
 
     public CodecBinMsg(int totalDataLen, int msgTypeValue,

Reply via email to