You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ro...@apache.org on 2024/04/25 07:32:46 UTC

(iotdb) branch master updated: Pipe: Properly handle OUT_OF_TTL status code on receiver side when data syncing (#12414)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 8064ac58aa3 Pipe: Properly handle OUT_OF_TTL status code on receiver side when data syncing (#12414)
8064ac58aa3 is described below

commit 8064ac58aa33c316811c23eb6c341a36c27308ee
Author: Steve Yurong Su <ro...@apache.org>
AuthorDate: Thu Apr 25 15:32:40 2024 +0800

    Pipe: Properly handle OUT_OF_TTL status code on receiver side when data syncing (#12414)
---
 .../iotdb/db/pipe/receiver/visitor/PipeStatementTSStatusVisitor.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/visitor/PipeStatementTSStatusVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/visitor/PipeStatementTSStatusVisitor.java
index 4412eccf18e..7efd7b84473 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/visitor/PipeStatementTSStatusVisitor.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/visitor/PipeStatementTSStatusVisitor.java
@@ -76,7 +76,10 @@ public class PipeStatementTSStatusVisitor extends StatementVisitor<TSStatus, TSS
 
   private TSStatus visitInsertBase(
       final InsertBaseStatement insertBaseStatement, final TSStatus context) {
-    if (context.getCode() == TSStatusCode.METADATA_ERROR.getStatusCode()) {
+    if (context.getCode() == TSStatusCode.OUT_OF_TTL.getStatusCode()) {
+      return new TSStatus(TSStatusCode.PIPE_RECEIVER_IDEMPOTENT_CONFLICT_EXCEPTION.getStatusCode())
+          .setMessage(context.getMessage());
+    } else if (context.getCode() == TSStatusCode.METADATA_ERROR.getStatusCode()) {
       return new TSStatus(TSStatusCode.PIPE_RECEIVER_USER_CONFLICT_EXCEPTION.getStatusCode())
           .setMessage(context.getMessage());
     }